The Lab
ENTITY native

GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM

returns Player4 paramsbuild 1207

Returns the player on team nearest to the entity.

Signature

C
Player GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM(Entity entity, int team, Ped playerPedToIgnore, int flags); // 0xB2C30C3B4AFF718C b1207

Parameters

#NameType
1entityEntity
2teamint
3playerPedToIgnorePed
4flagsint

Facts

Facts about GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM
Name
GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM
Hash
0xB2C30C3B4AFF718C
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(0xB2C30C3B4AFF718C, -- GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM
  PlayerPedId(), -- Entity entity
  0, -- int team
  PlayerPedId(), -- Ped playerPedToIgnore
  0, -- int flags
  Citizen.ResultAsInteger()
)
print(player)
JavaScript
const player = Citizen.invokeNative("0xB2C30C3B4AFF718C", // GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM
  PlayerPedId(), // Entity entity
  0, // int team
  PlayerPedId(), // Ped playerPedToIgnore
  0, // int flags
  Citizen.resultAsInteger()
);
console.log(player)
C#
int player = Function.Call<int>((Hash)0xB2C30C3B4AFF718C, // GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM
  API.PlayerPedId(), // Entity entity
  0, // int team
  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.