Skip to content

setPedStoryProtected

Client-side

Available in Neon, not standard MTA

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

NATIVE GTA BEHAVIOR
No CTask is created

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

thePedped

Script ped only; players are rejected.

enabledbool

Whether 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.

Important behavior
  • 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

RELATED NEON APIS

Continue exploring

Read the system guide →