GetPlayerTeam

From SA-MP Wiki

Jump to: navigation, search


Find out what team a player is on.


Image:32px-Ambox_warning_orange.png Note: Players on the same team can not kill or damage each other unless they use a knife.


Parameters:
(playerid)
playeridThe player you want to return the team of.


ReturnsThe 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.

Personal tools
In other languages