getNearestParticipantToEntity
GET_NEAREST_PARTICIPANT_TO_ENTITY0xFFBD7052D65BE0FFThe GTA V native GET_NEAREST_PARTICIPANT_TO_ENTITY of the ENTITY namespace, as LS:MP client scripts call it: the global function getNearestParticipantToEntity, in JavaScript and in Lua.
getNearestParticipantToEntity(entity: Entity): numbergetNearestParticipantToEntity(entity: Entity): integer⚠
Not in this game build
The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.
Usage
JavaScript
const result = getNearestParticipantToEntity(entity);Lua
local result = getNearestParticipantToEntity(entity)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
Returns
int JavaScript number, Lua integerReference
- Namespace
- Entity ENTITY
- In the game
int GET_NEAREST_PARTICIPANT_TO_ENTITY(Entity entity)- Hash
0xFFBD7052D65BE0FF- Introduced
- Game build 2944 legacy numbering