setEntityCoords
SET_ENTITY_COORDS0x06843DA7060A026BThe GTA V native SET_ENTITY_COORDS of the ENTITY namespace, as LS:MP client scripts call it: the global function setEntityCoords, in JavaScript and in Lua.
setEntityCoords(
entity: Entity,
xPos: number,
yPos: number,
zPos: number,
xAxis: boolean,
yAxis: boolean,
zAxis: boolean,
clearArea: boolean
): voidsetEntityCoords(
entity: Entity,
xPos: number,
yPos: number,
zPos: number,
xAxis: boolean,
yAxis: boolean,
zAxis: boolean,
clearArea: boolean
)Usage
JavaScript
setEntityCoords(entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea);Lua
setEntityCoords(entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
setEntityCoords(entity, pos, xAxis, yAxis, zAxis, clearArea);Lua · with vectors
setEntityCoords(entity, pos, xAxis, yAxis, zAxis, clearArea)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
xPos | float | number | number |
yPos | float | number | number |
zPos | float | number | number |
xAxis | BOOL | boolean | boolean |
yAxis | BOOL | boolean | boolean |
zAxis | BOOL | boolean | boolean |
clearArea | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
p7 is always 1 in the scripts. Set to 1, an area around the destination coords for the moved entity is cleared from other entities.
Often ends with 1, 0, 0, 1); in the scripts. It works.
Axis - Invert Axis Flags
Reference
- Namespace
- Entity ENTITY
- In the game
void SET_ENTITY_COORDS(Entity entity, float xPos, float yPos, float zPos, BOOL xAxis, BOOL yAxis, BOOL zAxis, BOOL clearArea)- Hash
0x06843DA7060A026B