SA-MP Forums

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

Thread Tools Display Modes
Old 05/05/2016, 09:12 PM   #1
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

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 08:27 PM
aplying actor animation sayaunta Scripting Help 2 13/11/2015 07:06 AM
Actor animation SkullFire Scripting Help 7 26/07/2015 07:03 AM
Actor Animation - It does not work the first norton2 Scripting Help 6 25/05/2015 05:55 PM
Actor animation desync MP2 Scripting Help 13 28/04/2015 09:53 AM

All times are GMT. The time now is 05:24 AM.

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