| Property | Value |
|---|---|
| Native Name | GET_OFFSET_FROM_COORD_AND_HEADING_IN_WORLD_COORDS |
| Hash | 0x163E252DE035A133 |
| Return Type | Vector3 |
| Build | 1207 |
| Parameters | xPos (float), yPos (float), zPos (float), heading (float), xOffset (float), yOffset (float), zOffset (float) |
Description: Calculates the world coordinates after applying the specified offsets to the given position, relative to a certain heading.
This native is similar to GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS, but uses a world position and heading as the reference point.
Parameters
xPos(float) — The X coordinate of the original position.yPos(float) — The Y coordinate of the original position.zPos(float) — The Z coordinate of the original position.heading(float) — The heading (in degrees) relative to which the offsets are applied.xOffset(float) — Left/right offset from the coord.yOffset(float) — Forward/backward offset from the coord.zOffset(float) — Upward/downward offset from the coord.
Usage
Lua (Direct):
local result = GetOffsetFromCoordAndHeadingInWorldCoords(xPos, yPos, zPos, heading, xOffset, yOffset, zOffset)
Lua (Hash):
local result = Citizen.InvokeNative(0x163E252DE035A133, xPos, yPos, zPos, heading, xOffset, yOffset, zOffset)