PlayerClient

setPlayerTeam

SET_PLAYER_TEAM0x0299FA38396A4940

The GTA V native SET_PLAYER_TEAM of the PLAYER namespace, as LS:MP client scripts call it: the global function setPlayerTeam, in JavaScript and in Lua.

SignatureJavaScript
setPlayerTeam(player: Player, team: number): void
SignatureLua
setPlayerTeam(player: Player, team: integer)

Usage

JavaScript
setPlayerTeam(player, team);
Lua
setPlayerTeam(player, team)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger
teamintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Set player team on deathmatch and last team standing..

Reference

Namespace
Player PLAYER
In the game
void SET_PLAYER_TEAM(Player player, int team)
Hash
0x0299FA38396A4940

Open in the interactive natives reference