Simple Help [+rep for helpers]
#5

OnPlayerUpdate is not recommended. You may use a timer like this
PHP Code:
forward _UpdatePlayersStatus();


public 
OnGameModeInit()
{
    
SetTimer("_UpdatePlayersStatus"1000true);
    return 
1;
}

public 
_UpdatePlayersStatus()
{
    new 
Float:plHealth;
    for(new 
0,GetMaxPlayers(); j++)
    {
        if(!
IsPlayerConnected(i)) continue;
        
GetPlayerHealth(iplHealth);
        if(
plHealth <= 20)
        {
            
ApplyAnimation(i"CRACK""crckdeth2"4.010000);
        }
        else if(
plHealth >= 30)
        {
            
SetPlayerSpecialAction(iSPECIAL_ACTION_NONE);
            
ClearAnimations(i);
        }
    }

Reply


Messages In This Thread
Simple Help [+rep for helpers] - by howtodo - 07.03.2014, 07:18
Re: Simple Help [+rep for helpers] - by XK - 07.03.2014, 07:35
Re: Simple Help [+rep for helpers] - by mahardika - 07.03.2014, 07:35
Re: Simple Help [+rep for helpers] - by howtodo - 07.03.2014, 07:46
Re: Simple Help [+rep for helpers] - by CrazyFrenzy - 07.03.2014, 07:51
Re: Simple Help [+rep for helpers] - by howtodo - 07.03.2014, 07:56
Re: Simple Help [+rep for helpers] - by XK - 07.03.2014, 07:57
Re: Simple Help [+rep for helpers] - by howtodo - 07.03.2014, 07:59
Re: Simple Help [+rep for helpers] - by CrazyFrenzy - 07.03.2014, 07:59
Re: Simple Help [+rep for helpers] - by howtodo - 07.03.2014, 08:02

Forum Jump:


Users browsing this thread: 4 Guest(s)