RedM Natives

GET_NEAREST_PLAYER_TO_ENTITY

Hash0x990E294FC387FB88
Runtime nameGetNearestPlayerToEntity
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x7196842CB375CDB3

Signature

Player GET_NEAREST_PLAYER_TO_ENTITY(Entity entity, Ped playerPedToIgnore, int flags);

Parameters

NameTypeDescription
entityEntity—
playerPedToIgnorePed—
flagsint—

Returns Player

Usage

Lua
local retval = GetNearestPlayerToEntity(entity, playerPedToIgnore, flags)

-- always works, by hash
local retval = Citizen.InvokeNative(0x990E294FC387FB88, entity, playerPedToIgnore, flags, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetNearestPlayerToEntity(entity, playerPedToIgnore, flags);

// by hash
const retval = Citizen.invokeNative('0x990E294FC387FB88', entity, playerPedToIgnore, flags, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x990E294FC387FB88, entity, playerPedToIgnore, flags);

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.