Get alive players
#2

I didn't test it, but try this:
pawn Код:
stock GetPlayersAlive()
{
    new count = 0;
    new Float:hp;
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        GetPlayerHealth(i, hp);
        if (hp > 0) count++;
    }
    return count;
}
Reply


Messages In This Thread
Get alive players - by babecka - 25.07.2014, 09:07
Re: Get alive players - by Stinged - 25.07.2014, 09:15
Re: Get alive players - by Ihateyou - 25.07.2014, 09:16
Re: Get alive players - by babecka - 25.07.2014, 09:20
Re: Get alive players - by Konstantinos - 25.07.2014, 09:25
Re: Get alive players - by Ihateyou - 25.07.2014, 09:54
Re: Get alive players - by Ihateyou - 25.07.2014, 10:11
Re: Get alive players - by icra - 25.07.2014, 10:14
Re: Get alive players - by babecka - 25.07.2014, 15:14

Forum Jump:


Users browsing this thread: 1 Guest(s)