EntityClient

setEntityCoords

SET_ENTITY_COORDS0x06843DA7060A026B

The 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.

SignatureJavaScript
setEntityCoords(
  entity: Entity,
  xPos: number,
  yPos: number,
  zPos: number,
  xAxis: boolean,
  yAxis: boolean,
  zAxis: boolean,
  clearArea: boolean
): void
SignatureLua
setEntityCoords(
  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

ParameterTypeJavaScriptLua
entityEntitynumberinteger
xPosfloatnumbernumber
yPosfloatnumbernumber
zPosfloatnumbernumber
xAxisBOOLbooleanboolean
yAxisBOOLbooleanboolean
zAxisBOOLbooleanboolean
clearAreaBOOLbooleanboolean

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

Open in the interactive natives reference