getAnimInitialOffsetRotation
GET_ANIM_INITIAL_OFFSET_ROTATION0x4B805E6046EE9E47The GTA V native GET_ANIM_INITIAL_OFFSET_ROTATION of the PED namespace, as LS:MP client scripts call it: the global function getAnimInitialOffsetRotation, in JavaScript and in Lua.
getAnimInitialOffsetRotation(
animDict: string,
animName: string,
x: number,
y: number,
z: number,
xRot: number,
yRot: number,
zRot: number,
p8: number,
p9: number
): { x: number, y: number, z: number }getAnimInitialOffsetRotation(
animDict: string,
animName: string,
x: number,
y: number,
z: number,
xRot: number,
yRot: number,
zRot: number,
p8: number,
p9: integer
): Vector3Usage
JavaScript
const coords = getAnimInitialOffsetRotation(
animDict, animName, x, y, z, xRot, yRot, zRot, p8, p9
);Lua
local coords = getAnimInitialOffsetRotation(
animDict, animName, x, y, z, xRot, yRot, zRot, p8, p9
)
-- coords.x, coords.y, coords.zThree consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
const coords = getAnimInitialOffsetRotation(animDict, animName, pos, rot, p8, p9);Lua · with vectors
local coords = getAnimInitialOffsetRotation(animDict, animName, pos, rot, p8, p9)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
animDict | string | string | string |
animName | string | string | string |
x | float | number | number |
y | float | number | number |
z | float | number | number |
xRot | float | number | number |
yRot | float | number | number |
zRot | float | number | number |
p8 | float | number | number |
p9 | int | number | integer |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
Reference
- Namespace
- Ped PED
- In the game
Vector3 GET_ANIM_INITIAL_OFFSET_ROTATION(const char* animDict, const char* animName, float x, float y, float z, float xRot, float yRot, float zRot, float p8, int p9)- Hash
0x4B805E6046EE9E47