setPedStoryProtected
Persists GTA's grouped story-actor protection flags on a script ped across native recreation.
Syntax
bool setPedStoryProtected(ped thePed, bool enabled)GTA task mapping
This does not create a CTask. It persists five native story-script actor flags used by GTA's targeting, damage, carjacking, and vehicle-exit behavior.
Arguments
thePedpedScript ped only; players are rejected.
enabledboolWhether the grouped story protection is active.
Returns
true when the client-local policy was stored; false for a player or invalid element.
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.
- The policy covers never targeted, no critical hits, cannot be dragged out, stay in the car when jacked, and do not exit an upside-down vehicle.
- Disabling it restores the native values captured before the policy was enabled.
Where this comes from
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →