EntityClient

isEntityStatic

IS_ENTITY_STATIC0x1218E6886D3D8327

The GTA V native IS_ENTITY_STATIC of the ENTITY namespace, as LS:MP client scripts call it: the global function isEntityStatic, in JavaScript and in Lua.

SignatureJavaScript
isEntityStatic(entity: Entity): boolean
SignatureLua
isEntityStatic(entity: Entity): boolean

Usage

JavaScript
const result = isEntityStatic(entity);
Lua
local result = isEntityStatic(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

a static ped will not react to natives like "applyForceToEntity" or "setEntityVelocity" and oftentimes will not react to task-natives like "taskCombatPed". The only way I know of to make one of these peds react is to ragdoll them (or sometimes to use clearPedTasksImmediately(). Static peds include almost all far-away peds, beach-combers, peds in certain scenarios, peds crossing a crosswalk, peds walking to get back into their cars, and others. If anyone knows how to make a ped non-static without ragdolling them, please edit this with the solution.

Reference

Namespace
Entity ENTITY
In the game
BOOL IS_ENTITY_STATIC(Entity entity)
Hash
0x1218E6886D3D8327

Open in the interactive natives reference