setPedMissionActor
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
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
thePedpedScript ped only; players are rejected.
enabledboolDesired 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.
- 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
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →