[GameMode] [GM] Grove vs Ballas for newbies
#3

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;
}
And Done, hope you learned something
ohh, thanks for showing this man i am gonna edit it with this
Reply


Messages In This Thread
[GM] Grove vs Ballas for newbies - by Erkan - 10.11.2008, 19:38
Re: [GM] Grove vs Ballas for newbies - by matt2127 - 10.11.2008, 20:10
Re: [GM] Grove vs Ballas for newbies - by Erkan - 10.11.2008, 20:15
Re: [GM] Grove vs Ballas for newbies - by matt2127 - 10.11.2008, 20:18
Re: [GM] Grove vs Ballas for newbies - by whooper - 10.11.2008, 22:07
Re: [GM] Grove vs Ballas for newbies - by Erkan - 10.11.2008, 22:51
Re: [GM] Grove vs Ballas for newbies - by whooper - 11.11.2008, 01:21
Re: [GM] Grove vs Ballas for newbies - by DeltaAirlines12 - 29.08.2009, 01:39
Re: [GM] Grove vs Ballas for newbies - by Chrome - 29.08.2009, 01:45
Re: [GM] Grove vs Ballas for newbies - by im2fast4u - 12.09.2009, 20:00
Re: [GM] Grove vs Ballas for newbies - by KazanTip - 01.11.2009, 07:26
Re: [GM] Grove vs Ballas for newbies - by Jontay - 01.11.2009, 07:47
Re: [GM] Grove vs Ballas for newbies - by Blantas - 01.11.2009, 07:52
Re: [GM] Grove vs Ballas for newbies - by Zeromanster - 06.11.2009, 11:51
Re: [GM] Grove vs Ballas for newbies - by fuus - 11.12.2009, 17:27
Re: [GM] Grove vs Ballas for newbies - by acade - 11.12.2009, 17:38
Re: [GM] Grove vs Ballas for newbies - by (.Aztec); - 11.12.2009, 20:13

Forum Jump:


Users browsing this thread: 1 Guest(s)