SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 05/05/2016, 08:12 PM   #1
humayunaftabkhan02
Little Clucker
 
Join Date: Jan 2015
Location: Pakistan.
Posts: 24
Reputation: 0
Default How to stop actor's animation after the Player stops targetting actor?

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;
}
humayunaftabkhan02 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP]: Actor Animation Profeta22 Scripting Help 11 02/02/2016 07:27 PM
aplying actor animation sayaunta Scripting Help 2 13/11/2015 06:06 AM
Actor animation SkullFire Scripting Help 7 26/07/2015 06:03 AM
Actor Animation - It does not work the first norton2 Scripting Help 6 25/05/2015 04:55 PM
Actor animation desync MP2 Scripting Help 13 28/04/2015 08:53 AM


All times are GMT. The time now is 02:04 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.