RedM Natives

FREEZE_ENTITY_POSITION

Freezes or unfreezes an entity preventing its coordinates to change by the player if set to true.

Hash0x65C16D57
Runtime nameFreezeEntityPosition
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void FREEZE_ENTITY_POSITION(Entity entity, BOOL toggle);

Parameters

NameTypeDescription
entityEntity

The entity to freeze/unfreeze.

toggleBOOL

Freeze or unfreeze entity.

Returns void

Description

Cfx.re native reference

Freezes or unfreezes an entity preventing its coordinates to change by the player if set to true. You can still change the entity position using SET_ENTITY_COORDS.

This is the server-side RPC native equivalent of the client native FREEZE_ENTITY_POSITION.

Usage

Lua
FreezeEntityPosition(entity, toggle)

-- always works, by hash
Citizen.InvokeNative(0x65c16d57, entity, toggle)
JavaScript and C#
JavaScript
FreezeEntityPosition(entity, toggle);

// by hash
Citizen.invokeNative('0x65c16d57', entity, toggle);
C#
Function.Call((Hash)0x65c16d57, entity, toggle);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.