Detect if player is falling
#1

Hello,

How can I detect if player is falling ( without parachute )
I got this, but not working very well.
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
        if(!strcmp(animname,"FALL_COLLAPSE",true))
        {
        if(PlayerInfo[playerid][pHas] == 0)
        {
        GivePlayerHP(playerid,-10);
        SCM(playerid,COLOR_RED,"You fall and will -10 hp");
        PlayerInfo[playerid][pHas] = 1;
        SetTimerEx("UnHass",3000,0,"i",playerid);
        }
        }
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=73880
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)