SetPlayerTeam
From SA-MP Wiki
Description:
Set the team of a player.
Notes |
|
(playerid, teamid)
playerid | The ID of the player you want to set the team of. |
teamid | The team to put the player in. Use NO_TEAM to remove the player from any team. |
Return Values:
This function does not return any specific values.
Example Usage:
public OnPlayerSpawn(playerid) { // Set a player's team to 4 when they spawn SetPlayerTeam(playerid, 4); return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerTeam: Check what team a player is on.
- SetTeamCount: Set the number of teams available.
- EnableVehicleFriendlyFire: Enable friendly fire for team vehicles.