GET_NEAREST_PLAYER_TO_ENTITY
Hash
0x990E294FC387FB88Runtime name
GetNearestPlayerToEntityNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x7196842CB375CDB3Signature
Player GET_NEAREST_PLAYER_TO_ENTITY(Entity entity, Ped playerPedToIgnore, int flags);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
playerPedToIgnore | Ped | — |
flags | int | — |
Returns Player
Usage
local retval = GetNearestPlayerToEntity(entity, playerPedToIgnore, flags)
-- always works, by hash
local retval = Citizen.InvokeNative(0x990E294FC387FB88, entity, playerPedToIgnore, flags, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetNearestPlayerToEntity(entity, playerPedToIgnore, flags);
// by hash
const retval = Citizen.invokeNative('0x990E294FC387FB88', entity, playerPedToIgnore, flags, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x990E294FC387FB88, entity, playerPedToIgnore, flags);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.