isEntityStatic
IS_ENTITY_STATIC0x1218E6886D3D8327The 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.
isEntityStatic(entity: Entity): booleanisEntityStatic(entity: Entity): booleanUsage
const result = isEntityStatic(entity);local result = isEntityStatic(entity)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
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