04.03.2014, 20:33
I'm trying to make it so if a player is in the lobby and is afk, (paused) my system will bypass them and only teleport non-paused players into the round.
Here's some relevant code.
Here's some relevant code.
pawn Код:
CMD:ready(playerid, params[])
{
if(IsPlayerReady[playerid] == 1)
{
return SendClientMessage(playerid,COLOR_GREY, "Error: You're already ready.");
}
if(GameProgress == 1)
{
return SendClientMessage(playerid,COLOR_GREY, "Error: You can't /ready when a game is in progress.");
}
if(intro[playerid] == 1)
{
return SendClientMessage(playerid,COLOR_GREY, "Error: You can't /ready when in the introduction.");
}
IsPlayerReady[playerid] = 1;
LobbyCount++;
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
new string[128];
format(string,sizeof(string), "%s is ready to enter the Hunger Games Tournament.",name);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}