GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM
Returns the player on team nearest to the entity.
Signature
Player GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM(Entity entity, int team, Ped playerPedToIgnore, int flags); // 0xB2C30C3B4AFF718C b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | team | int |
| 3 | playerPedToIgnore | Ped |
| 4 | flags | int |
Facts
| 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.
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)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)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
);Related ENTITY natives
- GET_NEAREST_PLAYER_TO_ENTITY
- GET_NEAREST_PARTICIPANT_TO_ENTITY
- _GET_LAST_ENTITY_TO_DAMAGE_ENTITY
- GET_ENTITY_ATTACHED_TO
- ATTACH_ENTITY_TO_ENTITY
- ATTACH_ENTITY_TO_ENTITY_PHYSICALLY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT
- IS_ENTITY_ATTACHED_TO_ENTITY
- GET_CARRIABLE_ENTITY_STATE
- GET_ENTITY_ALPHA
- GET_ENTITY_BONE_INDEX_BY_NAME
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.