10.11.2008, 20:15
Quote:
Originally Posted by iMatt™
Good gamemode, but one suggestion.
When your doing the team count to check if the teams have an even amount of players, you made it very confusing and unnecessary. I will show you how easy it is Code:
//on top of script new GroveCount; new BallasCount; //============= //ongamemodeinit GroveCount = 0; BallasCount = 0; //============= //onplayerspawn if(gTeam[playerid] == TEAM_GROVE) { GroveCount += 1; } else if(gTeam[playerid] == TEAM_BALLAS) { BallasCount += 1; } //============= //onplayerrequestspawn if(gTeam[playerid] == TEAM_GROVE && GroveCount > BallasCount) { SendClientMessage(playerid,COLOR_RED,"This Team Has Too Many Players!"); return 0; } else if(gTeam[playerid] == TEAM_BALLAS && BallasCount > GroveCount) { SendClientMessage(playerid,COLOR_RED,"This Team Has Too Many Players!"); return 0; } //================== //onplayerdisconnect if(gTeam[playerid] == TEAM_GROVE) { GroveCount -= 1; } else if(gTeam[playerid] == TEAM_BALLAS) { BallasCount -= 1; } |