GetPlayerTeam
From SA-MP Wiki
(Difference between revisions)
Revision as of 16:53, 19 August 2013 Smithy (Talk | contribs) ← Previous diff |
Revision as of 04:58, 2 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 25: | Line 25: | ||
[[de:GetPlayerTeam]] | [[de:GetPlayerTeam]] | ||
+ | [[fr:GetPlayerTeam]] |
Revision as of 04:58, 2 February 2014
Description:
Get the ID of the team the player is on.
(playerid)
playerid | The ID of the player to return the team of. |
Return Values:
The ID of the team the player is on, or 255 (defined as 'NO_TEAM') if they aren't on a team (default).
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.