The Lab
ENTITY native

GET_NEAREST_PLAYER_TO_ENTITY

returns Player3 paramsbuild 1207

Returns the player nearest to the entity, optionally ignoring a given player ped.

Signature

C
Player GET_NEAREST_PLAYER_TO_ENTITY(Entity entity, Ped playerPedToIgnore, int flags); // 0x990E294FC387FB88 b1207

Parameters

#NameType
1entityEntity
2playerPedToIgnorePed
3flagsint

Facts

Facts about GET_NEAREST_PLAYER_TO_ENTITY
Name
GET_NEAREST_PLAYER_TO_ENTITY
Hash
0x990E294FC387FB88
Namespace
Returns
Player
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local player = Citizen.InvokeNative(0x990E294FC387FB88, -- GET_NEAREST_PLAYER_TO_ENTITY
  PlayerPedId(), -- Entity entity
  PlayerPedId(), -- Ped playerPedToIgnore
  0, -- int flags
  Citizen.ResultAsInteger()
)
print(player)
JavaScript
const player = Citizen.invokeNative("0x990E294FC387FB88", // GET_NEAREST_PLAYER_TO_ENTITY
  PlayerPedId(), // Entity entity
  PlayerPedId(), // Ped playerPedToIgnore
  0, // int flags
  Citizen.resultAsInteger()
);
console.log(player)
C#
int player = Function.Call<int>((Hash)0x990E294FC387FB88, // GET_NEAREST_PLAYER_TO_ENTITY
  API.PlayerPedId(), // Entity entity
  API.PlayerPedId(), // Ped playerPedToIgnore
  0 // int flags
);
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.