Injured when you either fall of roofs, or just get hit.
#1

Hey. Could you guys help me with this? The title pretty much explains what I want. For example, when you fall off a roof, you shouldn't be able to walk properly anymore, or just be dazed. So, if that happens, I'd like to get the old man walking command enabled, and the player would go in the 'injured' animation for about fifteen seconds.

The injured animation would be this.
Код:
ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
I'm already pretty around it, but I have no idea where to put things, could anyone help me out?
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

I can't think about method of checking if someone fell from the roof though. Timer checking on what height player is might be helpful, but I don't know if it will be precise enough.
Reply
#3

Thanks, I'll try something.
Reply
#4

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    ApplyAnimation(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
    SetTimerEx("Injured", 15000, 0, "i", playerid);
    return 1;
}
Anywhere, Not in callbacks

pawn Код:
forward Injured(playerid);
public Injured(playerid)
{
    ClearAnimations(playerid);
    return 1;
}
Reply
#5

I think there is a animation for when the player is lying on the ground from a fall. Check for that when a player takes damage.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)