setPedWeaponAccuracy
Sets GTA's persistent 0–255 weapon-accuracy byte used for shot spread.
Syntax
bool setPedWeaponAccuracy(ped thePed, int accuracy)GTA task mapping
02E2 SCM equivalent: SET_CHAR_ACCURACY
This does not create a CTask. It writes GTA's persistent accuracy byte, which native weapon tasks use when calculating spread.
Arguments
thePedpedLiving streamed ped simulated by this client.
accuracyintValue from 0 through 255.
Returns
true when applied; false for ownership, streaming, liveness, or range failure.
Ownership and lifecycle
Low-level ped task calls require the client that simulates the living, streamed ped. Driving tasks also require control of the streamed vehicle. They do not create lifecycle handles; the optional native-task-runtime adds server-owned route epochs and reconstruction for drive_to routes. Gang-tag ownership is resource-exclusive, survives object streaming and recreation, and is released automatically when the owner stops.
OOP aliases
ped:setWeaponAccuracy(accuracy)
Where this comes from
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →