Lying on floor if lower then 5 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: Lying on floor if lower then 5 hp (
/showthread.php?tid=378026)
Lying on floor if lower then 5 hp -
Admigo - 16.09.2012
Heey all,
I made a simple bleeding out system for when a player has lower then 5 health he is lying on the floor and can be revived.
Код:
if(HP<=5)
{
TogglePlayerControllable(playerid,0);
ApplyAnimation(playerid,"CRACK","crckdeth2",2.0,1,0,0,1,1);
}
But sometimes the player freezes and still standing.
How can i make the player lying on the floor?
Or is it possible to use something onplayerdeath that the player freezes and get be revived?
Thanks Admigo
Re: Lying on floor if lower then 5 hp - HuSs3n - 16.09.2012
did you preload the animation?
Re: Lying on floor if lower then 5 hp -
Kitten - 16.09.2012
Mostly if they pause they stand up before using the ApplyAnimation use ClearnAnimation above TogglePlayerControllable if not use a static timer then destroy it after he get's revived make sure the timer isn't 1ms.
Re: Lying on floor if lower then 5 hp -
Admigo - 16.09.2012
Quote:
Originally Posted by Kitten
Mostly if they pause they stand up before using the ApplyAnimation use ClearnAnimation above TogglePlayerControllable if not use a static timer then destroy it after he get's revived make sure the timer isn't 1ms.
|
I am using OnPlayerUpdate. I need to change that?
Re: Lying on floor if lower then 5 hp -
Kitten - 16.09.2012
@admigo Never use OnPlayerUpdate for these kind of code.