SetPlayerTeam

From SA-MP Wiki

Jump to: navigation, search

SetPlayerTeam


Set the team of a player


Note: Players on the same team can not kill eachother


Parameters:
(playerid, teamid)
playeridThe ID of the player you want to set the team of.
teamidThe team to put the player in.


This function does not return a specific value.


public OnPlayerSpawn(playerid)
{
    // Set a player's team to 4 when they spawn
    SetPlayerTeam(playerid, 4);
    return 1;
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools