RedM Natives

GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM

Hash0xB2C30C3B4AFF718C
Runtime nameGetNearestPlayerToEntityOnTeam
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x4DC9A62F844D9337

Signature

Player GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM(Entity entity, int team, Ped playerPedToIgnore, int flags);

Parameters

NameTypeDescription
entityEntity—
teamint—
playerPedToIgnorePed—
flagsint—

Returns Player

Usage

Lua
local retval = GetNearestPlayerToEntityOnTeam(entity, team, playerPedToIgnore, flags)

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

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

Sources

alloc8or RDR3 NativeDB

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