Natives ENTITY 0x2274BC1C4885E333 Vector3 GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS (Entity entity, float posX, float posY, float posZ); Documentation Community 0
Property
Value
Native Name
GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS
Hash
0x2274BC1C4885E333
Return Type
Vector3
Parameters
entity (Entity), posX (float), posY (float), posZ (float)
Description: ```
Converts world coords (posX - Z) to coords relative to the entity
Example:
posX = 50
posY = 1000
posZ = 60
Entity's coords are: x=30, y=1000, z=60.
All three returned coords will then be in range of [-20,20] depending on rotation of the entity.
Back to ENTITY Before you callCitizen.InvokeNative in CitizenFX Lua does not auto-marshal float/Vector3 returns — the result comes back wrong (community reports both a plain boolean and only-the-x-component-as-a-number); for these returns use the named Lua wrapper (e.g. GetEntityVelocity, GetPedBoneCoords, GetOffsetFromEntityInWorldCoords) or append Citizen.ResultAsVector() / Citizen.ResultAsFloat() as the final InvokeNative argument, and in JS/TS (no wrapper exists) Citizen.resultAsVector() / resultAsFloat() is mandatory; plain int/handle and void returns are unaffected.
Let your AI read the fine print. Native signatures, warnings, and community context. Directly in your editor.
Connect via MCP