SA-MP Forums Archive
[GameMode] [GM] Grove vs Ballas for newbies - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Gamemode Scripts (https://sampforum.blast.hk/forumdisplay.php?fid=71)
+--- Thread: [GameMode] [GM] Grove vs Ballas for newbies (/showthread.php?tid=55049)



[GM] Grove vs Ballas for newbies - Erkan - 10.11.2008

Hey all, i decidet to make a simple grove vs ballas (in idlewood and grove) a gamemode for newbies it's not a perfect gamemode, please don't flame or something it's my first release for new PLayer.

About: You all know i think grove and ballas are the rival enemys in SP , so they can fight here now till to end .

Thanks.

Here is a pastebin link

http://de.pastebin.ca/1250858


IMatt's thing edited
http://de.pastebin.ca/1251127


Re: [GM] Grove vs Ballas for newbies - matt2127 - 10.11.2008

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


Re: [GM] Grove vs Ballas for newbies - Erkan - 10.11.2008

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


Re: [GM] Grove vs Ballas for newbies - matt2127 - 10.11.2008

No problem, you have good potential.


Re: [GM] Grove vs Ballas for newbies - whooper - 10.11.2008

nice


Re: [GM] Grove vs Ballas for newbies - Erkan - 10.11.2008

Quote:
Originally Posted by whooper
nice
thanks


Re: [GM] Grove vs Ballas for newbies - whooper - 11.11.2008

np


Re: [GM] Grove vs Ballas for newbies - DeltaAirlines12 - 29.08.2009

Very Nice! A Dead Link! : D


Re: [GM] Grove vs Ballas for newbies - Chrome - 29.08.2009

Cool .


Re: [GM] Grove vs Ballas for newbies - im2fast4u - 12.09.2009

nice job


Re: [GM] Grove vs Ballas for newbies - KazanTip - 01.11.2009

nice work mane


Re: [GM] Grove vs Ballas for newbies - Jontay - 01.11.2009

Nice work.

Reasonably clean and good for newbies as titled.

Thanks mate.

Jonteh


Re: [GM] Grove vs Ballas for newbies - Blantas - 01.11.2009

Quote:
Originally Posted by 2pacalypse
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

Код:
//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
Instead of this crap, you could use a loop in OnPlayerRequestSpawn to get a team count.

BTW: When player gets crashed, OnPlayerDisconnect callback won't be called.


Re: [GM] Grove vs Ballas for newbies - Zeromanster - 06.11.2009

Quote:
Originally Posted by im2fast4u
nice job
I agree. Good work.


Re: [GM] Grove vs Ballas for newbies - fuus - 11.12.2009

Working links?


Re: [GM] Grove vs Ballas for newbies - acade - 11.12.2009

Why don't you stop spamming and have a look yourself?


Re: [GM] Grove vs Ballas for newbies - (.Aztec); - 11.12.2009

Nicely done. :]