Skip to content

setPedMissionActor

Client-side

Available in Neon, not standard MTA

Persists GTA's PED_MISSION classification on a script-created ped across native model recreation.

Syntax

bool setPedMissionActor(ped thePed, bool enabled)

GTA task mapping

NATIVE GTA BEHAVIOR
No CTask is created

This does not create a CTask. It applies GTA's PED_MISSION actor classification and preserves the native state needed by tasks such as CarDrive and GunControl.

Arguments

thePedped

Script ped only; players are rejected.

enabledbool

Desired local policy.

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
  • This policy may be set while the native ped is streamed out.
  • It is client-local and last-writer-wins; synchronized resources must replicate and clear it deliberately.

OOP aliases

  • ped:setMissionActor(enabled)
  • ped.missionActor = enabled

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →