Checking if there is someone alive.
#4

a new way may help you:

pawn Код:
CMD:checkplayers(playerid, params[])
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        new Float:hp, str[185], pname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
        if(GetPlayerHealth(playerid, hp) <= 0) return 1;
        format(str, 185, "%s is still alive with health: %d", pname, GetPlayerHealth(playerid, hp));
        SendClientMessage(playerid, 1, str);
    }
    return 1;
}
Reply


Messages In This Thread
Checking if there is someone alive. - by ValentinLaw - 18.08.2012, 22:32
Re: Checking if there is someone alive. - by ReVo_ - 18.08.2012, 22:39
Re: Checking if there is someone alive. - by Larceny - 18.08.2012, 22:51
Re: Checking if there is someone alive. - by Youice - 18.08.2012, 23:44
Re: Checking if there is someone alive. - by ValentinLaw - 21.08.2012, 18:39
Re: Checking if there is someone alive. - by Finn - 21.08.2012, 19:52

Forum Jump:


Users browsing this thread: 2 Guest(s)