Change walking style on low hp
#1

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
Reply
#2

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 ?
Reply
#3

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
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)