Skip to content

setPedPhysicalProofs

Client-side

Choose exactly which kinds of physical damage an NPC ignores: bullets, fire, explosions, collisions, or melee hits.

Syntax

bool setPedPhysicalProofs(ped thePed, bool bullet, bool fire, bool explosion, bool collision, bool melee)

GTA task mapping

NATIVE GTA BEHAVIOR
No CTask is created

SCM equivalent: SET_CHAR_PROOFS

This does not create a CTask. It writes GTA's five independent ped-proof flags and keeps them on the MTA ped for native recreation.

Arguments

thePedped

Script ped controlled by this client; players are rejected.

bulletbool

Bullet-proof flag.

firebool

Fire-proof flag.

explosionbool

Explosion-proof flag.

collisionbool

Collision-proof flag.

meleebool

Melee-weapon-proof flag.

Returns

true when the current ped syncer stored the complete proof tuple; false for a player, invalid ped, or observer client.

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 survives stream-out and native ped recreation on this client.
  • It has no automatic resource-stop restoration. Save the previous values with getPedPhysicalProofs and restore them during cleanup.

Example

-- Temporarily make a mission actor fireproof.
local bullet, fire, explosion, collision, melee = getPedPhysicalProofs(actor)
assert(setPedPhysicalProofs(actor, bullet, true, explosion, collision, melee))
-- Restore this tuple when the scene ends.
setPedPhysicalProofs(actor, bullet, fire, explosion, collision, melee)

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →