GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS
Hash
0x497C6B1A2C9AE69CRuntime name
GetOffsetFromEntityGivenWorldCoordsNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x2274BC1C4885E333Signature
Vector3 GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS(Entity entity, float posX, float posY, float posZ);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
posX | float | — |
posY | float | — |
posZ | float | — |
Returns Vector3
Usage
local retval = GetOffsetFromEntityGivenWorldCoords(entity, posX, posY, posZ)
-- always works, by hash
local retval = Citizen.InvokeNative(0x497C6B1A2C9AE69C, entity, posX, posY, posZ, Citizen.ResultAsVector())JavaScript and C#
const retval = GetOffsetFromEntityGivenWorldCoords(entity, posX, posY, posZ);
// by hash
const retval = Citizen.invokeNative('0x497C6B1A2C9AE69C', entity, posX + 0.0000001, posY + 0.0000001, posZ + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsVector());Vector3 retval = Function.Call<Vector3>((Hash)0x497C6B1A2C9AE69C, entity, posX, posY, posZ);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.