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

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
Reply
#2

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
Reply
#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
#4

No problem, you have good potential.
Reply
#5

nice
Reply
#6

Quote:
Originally Posted by whooper
nice
thanks
Reply
#7

np
Reply
#8

Very Nice! A Dead Link! : D
Reply
#9

Cool .
Reply
#10

nice job
Reply
#11

nice work mane
Reply
#12

Nice work.

Reasonably clean and good for newbies as titled.

Thanks mate.

Jonteh
Reply
#13

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.
Reply
#14

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

Working links?
Reply
#16

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

Nicely done. :]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)