07.06.2017, 09:56
PHP код:
new totalplayers; //This will hold the amount of players in room.
CMD:enterroom(playerid, params[]) //Or whatever command is.
{
if(totalplayers == 5) //Check if the var "totalplayers" has a value of 5.
return scm(playerid, -1, "limit reached"); //if yes return and send a msg.
totalplayers++; //increase the variable.
return 1;
}
CMD:exitroom(playerid, params[])
{
totalplayers--; //decrease the variable that holds amount of players in room.
return 1;
}