EntityClient

getEntityForwardX

GET_ENTITY_FORWARD_X0x8BB4EF4214E0E6D5

The GTA V native GET_ENTITY_FORWARD_X of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityForwardX, in JavaScript and in Lua.

SignatureJavaScript
getEntityForwardX(entity: Entity): number
SignatureLua
getEntityForwardX(entity: Entity): number

Usage

JavaScript
const value = getEntityForwardX(entity);
Lua
local value = getEntityForwardX(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

float JavaScript number, Lua number

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Gets the X-component of the entity's forward vector.

Reference

Namespace
Entity ENTITY
In the game
float GET_ENTITY_FORWARD_X(Entity entity)
Hash
0x8BB4EF4214E0E6D5

Open in the interactive natives reference