GetPlayerTeam
From SA-MP Wiki
GetPlayerTeam
Find out what team a player is on.
(playerid)
| playerid | The player you wan't to return the team of. |
| Returns | The team the player is on. |
public OnPlayerSpawn(playerid) { // Players who are in Team 1 should spawn at Las Venturas Airport. if(GetPlayerTeam(playerid) == 1) SetPlayerPos( playerid, 1667.8909, 1405.5618, 10.7801); return 1; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- SetPlayerTeam: Set a player's team.
- SetTeamCount: Set the number of teams available.
