[HELP]Last Man Alive
#2

Quote:
Originally Posted by Seif_
First, make sure you have a variable to check if someone is dead or not. Set it to true in OnPlayerDeath and false in OnPlayerSpawn and wherever that can respawn you if it's possible.
Then, after 8 minutes, make a loop to check how many aren't dead.
pawn Код:
new alivecount, survivor;
for(new i, m = GetMaxPlayers(); i < m; i++)
{
    if (!IsPlayerConnected(i)) continue;
    if (!Dead[i])
    {
        alivecount++;
        survivor = i;
    }
}
if (alivecount) SendClientMessage(survivor, GREEN, "You win!");
I understand your first bit, but the code sounds giberis to me =S
Reply


Messages In This Thread
[HELP]Last Man Alive - by Tigerbeast11 - 22.11.2009, 14:08
Re: Last Man Alive - by Tigerbeast11 - 22.11.2009, 14:14
Re: [HELP]Last Man Alive - by Tigerbeast11 - 22.11.2009, 14:23
Re: [HELP]Last Man Alive - by Tigerbeast11 - 23.11.2009, 06:50

Forum Jump:


Users browsing this thread: 1 Guest(s)