Lying on floor if lower then 5 hp
#1

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

did you preload the animation?
Reply
#3

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

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

@admigo Never use OnPlayerUpdate for these kind of code.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)