setEntityVelocity
SET_ENTITY_VELOCITY0x1C99BB7B6E96D16FThe GTA V native SET_ENTITY_VELOCITY of the ENTITY namespace, as LS:MP client scripts call it: the global function setEntityVelocity, in JavaScript and in Lua.
setEntityVelocity(entity: Entity, x: number, y: number, z: number): voidsetEntityVelocity(entity: Entity, x: number, y: number, z: number)Usage
JavaScript
setEntityVelocity(entity, x, y, z);Lua
setEntityVelocity(entity, x, y, z)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
setEntityVelocity(entity, pos);Lua · with vectors
setEntityVelocity(entity, pos)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.
Reference
- Namespace
- Entity ENTITY
- In the game
void SET_ENTITY_VELOCITY(Entity entity, float x, float y, float z)- Hash
0x1C99BB7B6E96D16F