GET_ENTITY_COORDS
Gets the current coordinates for a specified entity.
Hash
0xA86D5F069399F44DRuntime name
GetEntityCoordsNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x3FEF770D40960D5ASignature
Vector3 GET_ENTITY_COORDS(Entity entity, BOOL alive, BOOL realCoords);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
alive | BOOL | — |
realCoords | BOOL | — |
Returns Vector3
Description
Gets the current coordinates for a specified entity.entity = The entity to get the coordinates from.alive = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive.
If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.
Usage
local retval = GetEntityCoords(entity, alive, realCoords)
-- always works, by hash
local retval = Citizen.InvokeNative(0xA86D5F069399F44D, entity, alive, realCoords, Citizen.ResultAsVector())JavaScript and C#
const retval = GetEntityCoords(entity, alive, realCoords);
// by hash
const retval = Citizen.invokeNative('0xA86D5F069399F44D', entity, alive, realCoords, Citizen.returnResultAnyway(), Citizen.resultAsVector());Vector3 retval = Function.Call<Vector3>((Hash)0xA86D5F069399F44D, entity, alive, realCoords);See also
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.