count players
#1

Hello, I have come up with an interesting minigame but I don't know how to match the number of players, if team 1 has 1 player, you enter Team 2 and when Team 2 has the same amount, the next player enters Team 1 and so on...

Thanks!
Reply
#2

See this example:
pawn Code:
new TDM_Count = 0; //on top of script

TDM_Count++; //Add 1 to the var
if(TDM_Count == 3) TDM_Count = 1; //If the var is 3, we set it to 1
SetPlayerTeam(playerid, TDM_Count); //finally, set the player team
// TDM_Count can only be 1 or 2
Reply
#3

Quote:
Originally Posted by xRadical3
View Post
See this example:
pawn Code:
new TDM_Count = 0; //on top of script

TDM_Count++; //Add 1 to the var
if(TDM_Count == 3) TDM_Count = 1; //If the var is 3, we set it to 1
SetPlayerTeam(playerid, TDM_Count); //finally, set the player team
// TDM_Count can only be 1 or 2
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)