Is Player Alive
#3

PHP код:
new Alive 0;
public 
OnPlayerConnect(playerid)
{
    
Alive++; // if you want to set player as alive when he joins
}
public 
OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_WASTED || PLAYER_STATE_SPECTATING) { Alive++; }
    else if(
newstate == !(PLAYER_STATE_WASTED || PLAYER_STATE_SPECTATING)) { Alive--; }
    return 
1;
}
// use Alive variable in textdraw ^^ 
Reply


Messages In This Thread
Is Player Alive - by aoky - 08.02.2017, 20:59
Re: Is Player Alive - by Vince - 08.02.2017, 21:03
Re: Is Player Alive - by YouHack - 19.05.2017, 18:49
Re: Is Player Alive - by CheezIt - 20.05.2017, 00:42

Forum Jump:


Users browsing this thread: 2 Guest(s)