How to stop actor's animation after the Player stops targetting actor?
#1

Hi, so there's this script that if player targets the actor, he starts doing the hands up animation, but how do I make it stop just when the player stops targetting him?

pawn Code:
if(playerTargetActor != INVALID_ACTOR_ID)
    {
        new playerWeapon = GetPlayerWeapon(playerid);

        new keys, updown, leftright;
        GetPlayerKeys(playerid, keys, updown, leftright);

        if(!ActorHandsup[playerTargetActor] && playerWeapon >= 22 && playerWeapon <= 42 && keys & KEY_AIM)
        {
            ApplyActorAnimation(playerTargetActor, "SHOP", "SHP_HandsUp_Scr",4.1,0,0,0,1,0);

            ActorHandsup[playerTargetActor] = true;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)