SetPlayerTeam
From SA-MP Wiki
(Difference between revisions)
| Revision as of 16:47, 16 January 2011 VWOer (Talk | contribs) ← Previous diff |
Revision as of 02:01, 27 July 2012 Calgon (Talk | contribs) Next diff → |
||
| Line 5: | Line 5: | ||
| {{note|Players on the same team can not kill each other unless they use a knife.}} | {{note|Players on the same team can not kill each other unless they use a knife.}} | ||
| + | |||
| + | {{note|-1 is the default team to be able to shoot other players, not 0.}} | ||
| {{Parameters|playerid, teamid}} | {{Parameters|playerid, teamid}} | ||
Revision as of 02:01, 27 July 2012
Set the team of a player
(playerid, teamid)
| playerid | The ID of the player you want to set the team of. |
| teamid | The team to put the player in. |
| Returns | This function doesn't 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 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.
