25.12.2009, 09:50
The Problem in this Code is, when 2 players are playin' on my Server , it shows the message "%s Joined the Boxring" twice .. and when 3 player are playin' then it shows that message 3 times ...
Please help me
Код:
#define BOXSLOTS 300 new PlayersInBoxRing[MAX_PLAYERS];
Код:
for(new i = 0;i < BOXSLOTS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayersInBoxRing[i] == 0)
{
PlayersInBoxRing[i]++;
format(string,sizeof(string),"%s joined the Boxring!",name);
SendClientMessageToAll(COLOR_GREEN,string);
}
else if(PlayersInBoxRing[i] == 1)
{
PlayersInBoxRing[i]++;
format(string,sizeof(string),"%s joined the Boxring as Challenger!",name);
SendClientMessageToAll(COLOR_GREEN,string);
}
else if(PlayersInBoxRing[i] <= 2)
{
SendClientMessage(playerid,COLOR_RED,"Their are already 2 Guys Boxing!");
return 1;
}
}
}


...