networkGetPredictedVelocity
NETWORK_GET_PREDICTED_VELOCITY0xAA5FAFCD2C5F5E47The GTA V native NETWORK_GET_PREDICTED_VELOCITY of the NETWORK namespace, as LS:MP client scripts call it: the global function networkGetPredictedVelocity, in JavaScript and in Lua.
networkGetPredictedVelocity(
entity: Entity,
maxSpeedToPredict: number
): { x: number, y: number, z: number }networkGetPredictedVelocity(
entity: Entity,
maxSpeedToPredict: number
): Vector3Usage
JavaScript
const { x, y, z } = networkGetPredictedVelocity(entity, maxSpeedToPredict);Lua
local coords = networkGetPredictedVelocity(entity, maxSpeedToPredict)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
maxSpeedToPredict | float | number | number |
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.
Reference
- Namespace
- Network NETWORK
- In the game
Vector3 NETWORK_GET_PREDICTED_VELOCITY(Entity entity, float maxSpeedToPredict)- Hash
0xAA5FAFCD2C5F5E47- Introduced
- Game build 1103 legacy numbering