Getplayerhealth /crack
#2

Use it on OnPlayerUpdate.
Something like:

pawn Код:
OnplayerUpdate(playerid)
{
    if(GetPlayerHealth(playerid) < 25.0 && GetPVarInt(playerid, "CrackAnimDone") == 0)
    {
         //ApplyCrackAnimHere
         //Set here a variable so that the crack animation doesn't keep applying. Something like
         SetPVarInt(playerid, "CrackAnimDone", 1);  
         TogglePlayerControllable(playerid, false);
    }
    else if(GetPVarInt(playerid, "CrackAnimDone") == 1 && GetPlayerHealth(playerid) > 25.0)
    {
         //remove the animation
         SetPVarInt(playerid, "CrackAnimDone", 0);  
         TogglePlayerControllable(playerid, true);
    }
    return 1;
}
Reply


Messages In This Thread
Getplayerhealth /crack - by Bam23 - 14.04.2011, 00:51
Re: Getplayerhealth /crack - by nemesis_567 - 14.04.2011, 00:59
Re: Getplayerhealth /crack - by DiegoRider - 18.10.2012, 13:51
Re: Getplayerhealth /crack - by Roel - 18.10.2012, 13:55

Forum Jump:


Users browsing this thread: 1 Guest(s)