SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 24/05/2015, 02:15 PM   #1
norton2
Huge Clucker
 
Join Date: Jul 2013
Posts: 433
Reputation: 9
Default Actor Animation - It does not work the first

"ApplyActorAnimation" does not work the first time. You have to execute the function several times to apply animations.
norton2 is offline   Reply With Quote
Old 24/05/2015, 03:34 PM   #2
Kyle
High-roller
 
Kyle's Avatar
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,391
Reputation: 314
Default Re: Actor Animation - It does not work the first

This is a known bug as it's the same for connected players, to counteract this, preload the animations.
Kyle is offline   Reply With Quote
Old 24/05/2015, 04:15 PM   #3
norton2
Huge Clucker
 
Join Date: Jul 2013
Posts: 433
Reputation: 9
Default Re: Actor Animation - It does not work the first

Not work.
HTML Code:
PreloadAnimLib(actorid, animlib[])
    {
        ApplyActorAnimation(actorid,animlib,"null",0.0,0,0,0,0,0);
    }
OnGameModeInit:
HTML Code:
ActorLS = CreateActor(246, 1932.1221,-1140.1854,13.4275, 0.0);
    PreloadAnimLib(ActorLS,"PED");

Last edited by norton2; 25/05/2015 at 06:06 AM.
norton2 is offline   Reply With Quote
Old 25/05/2015, 06:07 AM   #4
norton2
Huge Clucker
 
Join Date: Jul 2013
Posts: 433
Reputation: 9
Default Re: Actor Animation - It does not work the first

Anyone?
norton2 is offline   Reply With Quote
Old 25/05/2015, 07:40 AM   #5
Kyle
High-roller
 
Kyle's Avatar
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,391
Reputation: 314
Default Re: Actor Animation - It does not work the first

Put this in your script: http://pastebin.com/QsR6RagC

then

PreloadActorAnimations(ActorLS);


~ Credit to Emmet
Kyle is offline   Reply With Quote
Old 25/05/2015, 09:26 AM   #6
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,422
Reputation: 973
Default Re: Actor Animation - It does not work the first

You don't need to preload the animation for the actor... think about it.. You need to preload it for PLAYERS that will SEE the actor.
MP2 is offline   Reply With Quote
Old 25/05/2015, 04:55 PM   #7
Midzi
Big Clucker
 
Join Date: May 2011
Posts: 63
Reputation: 17
Default Re: Actor Animation - It does not work the first

I think that's bug about streaming player-actor.

I have this when I type teleport command to actor and actor haven't got anim, but when I type cmd again - it's work.

Fix that please :f
Midzi 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
Actor animation desync MP2 Scripting Help 13 28/04/2015 08:53 AM
Animation doesn't work DarkLored Scripting Help 5 17/05/2014 08:45 AM
[HELP] Animation Not WORK [REP+] tandytanz Scripting Help 1 30/06/2012 06:57 AM
[ANIMATION]The animation does not work dioguitosbr Help Archive 1 21/01/2010 10:59 PM
animation does not work [ATC]eRaZoR Help Archive 8 20/10/2009 12:56 PM


All times are GMT. The time now is 02:00 PM.


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