08.02.2013, 08:25
pawn Код:
enum info
{
pRace
}
new PlayerInfo[MAX_PLAYERS][info];
CMD:joinrace(playerid)
{
//Your IsPlayerInHisOwnVehicle
//Other conditions
new temp=0;
for(new i;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[i][pRace]==1
if(temp==6) temp = -1;
else temp++;
}
switch(temp)
{
case 1..5:
{//Teleport him to race and watever
PlayerInfo[playerid][pRace]=1;
}
case -1: //Sorry, race's full.
}
return 1;
}