Skip to content

setPedNeverTargeted

Client-side

Available in Neon, not standard MTA

Persists only GTA's never-targeted bit without enabling the grouped protagonist protection policy.

Syntax

bool setPedNeverTargeted(ped thePed, bool neverTargeted)

GTA task mapping

NATIVE GTA BEHAVIOR 0568
No CTask is created

SCM equivalent: SET_CHAR_NEVER_TARGETTED

This does not create a CTask. It writes GTA's native never-targeted bit; the original command name retains Rockstar's TARGETTED spelling.

Arguments

thePedped

Script ped only; players are rejected.

neverTargetedbool

Desired local targeting flag.

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 explicit scalar value survives native recreation and takes precedence over setPedStoryProtected regardless of call order.
  • This is a last-writer-wins local policy rather than a resource-owned lease.

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →