GetPlayerTeam
From SA-MP Wiki
Find out what team a player is on.
(playerid)
| playerid | The player you want to return the team of. |
| Returns | The team the player is on, or 255 (NO_TEAM) if he isn't in any team. |
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 may be useful, as they are related to this function in one way or another.
- SetPlayerTeam: Set a player's team.
- SetTeamCount: Set the number of teams available.
