addStuntJumpAngled
ADD_STUNT_JUMP_ANGLED0xBBE5D803A5360CBFThe GTA V native ADD_STUNT_JUMP_ANGLED of the MISC namespace, as LS:MP client scripts call it: the global function addStuntJumpAngled, in JavaScript and in Lua.
addStuntJumpAngled(
x1: number,
y1: number,
z1: number,
x2: number,
y2: number,
z2: number,
radius1: number,
x3: number,
y3: number,
z3: number,
x4: number,
y4: number,
z4: number,
radius2: number,
camX: number,
camY: number,
camZ: number,
p17: number,
p18: number,
p19: number
): numberaddStuntJumpAngled(
x1: number,
y1: number,
z1: number,
x2: number,
y2: number,
z2: number,
radius1: number,
x3: number,
y3: number,
z3: number,
x4: number,
y4: number,
z4: number,
radius2: number,
camX: number,
camY: number,
camZ: number,
p17: integer,
p18: integer,
p19: integer
): integerUsage
const result = addStuntJumpAngled(
x1, y1, z1, x2, y2, z2, radius1, x3, y3, z3, x4, y4, z4, radius2, camX, camY, camZ, p17, p18,
p19
);local result = addStuntJumpAngled(
x1, y1, z1, x2, y2, z2, radius1, x3, y3, z3, x4, y4, z4, radius2, camX, camY, camZ, p17,
p18, p19
)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
const result = addStuntJumpAngled(pos1, pos2, radius1, pos3, pos4, radius2, cam, p17, p18, p19);local result = addStuntJumpAngled(pos1, pos2, radius1, pos3, pos4, radius2, cam, p17, p18, p19)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x1 | float | number | number |
y1 | float | number | number |
z1 | float | number | number |
x2 | float | number | number |
y2 | float | number | number |
z2 | float | number | number |
radius1 | float | number | number |
x3 | float | number | number |
y3 | float | number | number |
z3 | float | number | number |
x4 | float | number | number |
y4 | float | number | number |
z4 | float | number | number |
radius2 | float | number | number |
camX | float | number | number |
camY | float | number | number |
camZ | float | number | number |
p17 | int | number | integer |
p18 | int | number | integer |
p19 | int | number | integer |
Returns
int JavaScript number, Lua integerNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Creates a new stunt jump.
The radius1 and radius2 might actually not be a radius at all, but that's what it seems to me testing them in-game. But they may be 'angle' floats instead, considering this native is named ADD_STUNT_JUMP_**ANGLED**.
Info about the specific 'parameter sections':
x1, y1, z1, x2, y2, z2 and radius1:
First coordinates are for the jump entry area, and the radius that will be checked around that area. So if you're not exactly within the coordinates, but you are within the outter radius limit then it will still register as entering the stunt jump. Note as mentioned above, the radius is just a guess, I'm not really sure about it's exact purpose.
x3, y3, z3, x4, y4, z4 and radius2:
Next part is the landing area, again starting with the left bottom (nearest to the stunt jump entry zone) coordinate, and the second one being the top right furthest away part of the landing area. Followed by another (most likely) radius float, this is usually slightly larger than the entry zone 'radius' float value, just because you have quite a lot of places where you can land (I'm guessing).
camX, camY and camZ:
The final coordinate in this native is the Camera position. Rotation and zoom/FOV is managed by the game itself, you just need to provide the camera location.
unk1, unk2 and unk3:
Not sure what these are for, but they're always 150, 0, 0 in decompiled scripts.
Here is a list of almost all of the stunt jumps from GTA V (taken from decompiled scripts): https://pastebin.com/EW1jBPkY
Reference
- Namespace
- Misc MISC
- In the game
int ADD_STUNT_JUMP_ANGLED(float x1, float y1, float z1, float x2, float y2, float z2, float radius1, float x3, float y3, float z3, float x4, float y4, float z4, float radius2, float camX, float camY, float camZ, int p17, int p18, int p19)- Hash
0xBBE5D803A5360CBF