06.03.2014, 18:15
Well, it's technically 3 timers thrown together. I'm not sure how to do a alternative.
pawn Код:
forward RoundStartTimer(playerid);
public RoundStartTimer(playerid)
{
if(LobbyCount > 1)
{
for(new i; i != GetMaxPlayers(); i++)
{
if(IsPlayerReady[i])
{
SetTimerEx("HungerTimer", 10000, true, "i", i);
SetPlayerTeam(i, NO_TEAM);
new rand = random(sizeof(rSpawns));
SetPlayerPos(i, rSpawns[rand][0], rSpawns[rand][1], rSpawns[rand][2]);
SetCameraBehindPlayer(i);
GameProgress = true;
LobbyCount = 0;
TogglePlayerControllable(i, 1);
hunger[i] = 100;
TextDrawSetString(Textdraw3, hungerstring);
TextDrawShowForPlayer(i, Textdraw3);
}
}
new string[128];
format(string,sizeof(string), "Total players: %d.", players);
SendClientMessageToAll(COLOR_GREY, string);
ShowNameTags(0);
SendClientMessage(playerid, COLOR_GREEN, "The Hunger games is prepairing to start, please be patient... (Name tags disabled)");
}
return 1;
}