SA-MP Forums Archive
Change walking style on low hp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Change walking style on low hp (/showthread.php?tid=470671)



Change walking style on low hp - Battlezone - 19.10.2013

When the player hp<=10 , i want to change player walking style , i tried hard to do it but it didnt work
Also when the player get healed, i want the normal walking style to get back
Please i don't want to use timers they are using much memory


Re: Change walking style on low hp - Wizzy951 - 19.10.2013

pawn Код:
new
    Float:health;
    GetPlayerHealth(playerid, health);
if (health <= 10.0)
    {
        ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
    }
else (health > 10.0)
    {
        ClearAnimations(playerid);
    }
    return 1;
}
And actually I got this from sa-mp wiki, why don't you search more ?


Re: Change walking style on low hp - Battlezone - 19.10.2013

That was not my question i already know how to make the if sctructure.
Edit for your Edit : I ALREADY KNOW THAT You still didnt answer my question : where shall i put it


Re: Change walking style on low hp - Wizzy951 - 19.10.2013

Quote:
Originally Posted by Battlezone
Посмотреть сообщение
That was not my question i already know how to make the if sctructure.
Edit for your Edit : I ALREADY KNOW THAT You still didnt answer my question : where shall i put it
Maybe it's a wrong suggestion, but try to put in the public OnPlayerUpdate(playerid) callback. If it doesn't work PM me.