Skip to content

setPedStayInSamePlace

Client-side

Available in Neon, not standard MTA

Persists GTA's scalar stay-in-place flag on a script ped without assigning a stand-still task.

Syntax

bool setPedStayInSamePlace(ped thePed, bool stayInSamePlace)

GTA task mapping

NATIVE GTA BEHAVIOR 0350
No CTask is created

SCM equivalent: SET_CHAR_STAY_IN_SAME_PLACE

This does not create a CTask. It writes GTA's scalar bStayInSamePlace ped flag through CPed::SetStayInSamePlace.

Arguments

thePedped

Script ped only; players are rejected.

stayInSamePlacebool

Desired local native 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 value survives stream-out and native recreation.
  • This is a client-local last-writer-wins policy, not a resource lease or movement task.

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →