RedM Natives

GET_PLAYER_TEAM

Gets the player's team.

Hash0xB464EB6A40C7975B
Runtime nameGetPlayerTeam
NamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x37039302F4E0A008

Signature

int GET_PLAYER_TEAM(Player player);

Parameters

NameTypeDescription
playerPlayer—

Returns int

Description

Gets the player's team.
Returns -1 in singleplayer.

Usage

Lua
local retval = GetPlayerTeam(player)

-- always works, by hash
local retval = Citizen.InvokeNative(0xB464EB6A40C7975B, player, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPlayerTeam(player);

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

See also

Sources

alloc8or RDR3 NativeDB

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