PDA

View Full Version : Actor Can't Apply Animations


Amunra
28/02/2016, 09:28 AM
I try to Make Actor In My Server But Actor Doesn't Apply The Animations .. Whats Wrong ?

I Follow This Instruction (Wiki Samp - Apply Actor Anim) (https://wiki.sa-mp.com/wiki/ApplyActorAnimation)

new ACTOR1;

public OnFilterScriptInit()
{
ACTOR1 = CreateActor(246,-2050.2026,232.0027,35.4254,0);
ApplyActorAnimation(ACTOR1,"STRIP", "strip_E", 4.1, 0, 0, 0, 0, 0);
return 1;
}

Anyway Thanks

Amunra
28/02/2016, 09:40 AM
Anyone ?
Bump

K0P
28/02/2016, 09:58 AM
You are setting the time to 0
Try this
ApplyActorAnimation(ACTOR1,"STRIP", "strip_E", 4.1, 0, 0, 0, 0, 1000*60); //Play the animation for 1 min

Amunra
29/02/2016, 07:22 AM
You are setting the time to 0
Try this
ApplyActorAnimation(ACTOR1,"STRIP", "strip_E", 4.1, 0, 0, 0, 0, 1000*60); //Play the animation for 1 min

https://wiki.sa-mp.com/wiki/ApplyActorAnimation
I Read from Wiki SA-MP and Wiki Sa-mp Said :
time Timer in milliseconds. For a never-ending loop it should be 0.
I Want to Make Actor Never Stop Anim

itsCody
29/02/2016, 07:42 AM
Preload the anims for the actors.

Amunra
29/02/2016, 07:51 AM
Preload the anims for the actors.

What your Mean ?

]Rafaellos[
29/02/2016, 08:35 AM
I think there is an issue so you can't apply animation to the first Actor. Create another one and check if it works on him.

At least, this is what I did when I had the same problem.

Amunra
29/02/2016, 08:47 AM
Rafaellos[;3664668']I think there is an issue so you can't apply animation to the first Actor. Create another one and check if it works on him.

At least, this is what I did when I had the same problem.

Trying

Amunra
29/02/2016, 09:07 AM
Rafaellos[;3664668']I think there is an issue so you can't apply animation to the first Actor. Create another one and check if it works on him.

At least, this is what I did when I had the same problem.

Same Thing -_-

]Rafaellos[
29/02/2016, 09:52 AM
Show me the code.

Amunra
29/02/2016, 09:54 AM
Rafaellos[;3664695']Show me the code.


Nothing Changes
new ACTOR1;
new ACTOR2;

public OnFilterScriptInit()
{
ACTOR1 = CreateActor(246,-2050.2026,232.0027,35.4254,0);
ApplyActorAnimation(ACTOR1,"STRIP", "strip_E", 4.1, 0, 0, 0, 0, 0);
ACTOR2 = CreateActor(246,-2054.2026,234.0027,35.4254,0);
ApplyActorAnimation(ACTOR2,"STRIP", "strip_E", 4.1, 0, 0, 0, 0, 0);
return 1;
}

]Rafaellos[
29/02/2016, 10:01 AM
This work perfectly fine to me, at least the second one because as I said, the first one doesn't work for some reason.


CMD:test(playerid)
{
new
actors[2]
;

actors[0] = CreateActor(246, -2050.2026, 232.0027, 35.4254, 0);
actors[1] = CreateActor(246, -2054.2026, 234.0027, 35.4254, 0);
ApplyActorAnimation(actors[0], "STRIP", "strip_E", 4.1, 1, 0, 0, 0, 0);
ApplyActorAnimation(actors[1], "STRIP", "strip_E", 4.1, 1, 0, 0, 0, 0);

SetPlayerPos(playerid, -2050.2026 + 5, 232.0027 + 5, 35.4254);
return 1;
}

Amunra
29/02/2016, 10:06 AM
Rafaellos[;3664698']This work perfectly fine to me, at least the second one because as I said, the first one doesn't work for some reason.


CMD:test(playerid)
{
new
actors[2]
;

actors[0] = CreateActor(246, -2050.2026, 232.0027, 35.4254, 0);
actors[1] = CreateActor(246, -2054.2026, 234.0027, 35.4254, 0);
ApplyActorAnimation(actors[0], "STRIP", "strip_E", 4.1, 1, 0, 0, 0, 0);
ApplyActorAnimation(actors[1], "STRIP", "strip_E", 4.1, 1, 0, 0, 0, 0);

SetPlayerPos(playerid, -2050.2026 + 5, 232.0027 + 5, 35.4254);
return 1;
}


Why Must Create Commands ?
I Read from wiki.sa-mp the Script can added at FilterscriptInit Or Gamemodeinit (I Already Try Filterscript script and Gamemode script)
Are this Command Work Perfectly ?
Because I Think , the Same Thing Happen With Actor

illuminati2
29/02/2016, 10:15 AM
Just Preload Animations. http://pastebin.com/0cURqKpV

(Didn't make the whole code, just took the necessary part from http://forum.sa-mp.com/showthread.php?t=568189 you can make it yourself, I just made it if you can't.)

This is just an example to preload Animations for players, you preload it for your actor. Too easy.

Amunra
29/02/2016, 10:23 AM
Just Preload Animations. http://pastebin.com/0cURqKpV

(Didn't make the whole code, just took the necessary part from http://forum.sa-mp.com/showthread.php?t=568189 you can make it yourself, I just made it if you can't.)

This is just an example to preload Animations for players, you preload it for your actor. Too easy.

Some Example ?

]Rafaellos[
29/02/2016, 10:27 AM
Why Must Create Commands ?
I Read from wiki.sa-mp the Script can added at FilterscriptInit Or Gamemodeinit (I Already Try Filterscript script and Gamemode script)
Are this Command Work Perfectly ?
Because I Think , the Same Thing Happen With Actor

It was for testing. You can still put it under filterscriptinit.

illuminati2
29/02/2016, 10:35 AM
http://pastebin.com/BW1FVbCK

This will apply the animation for the actor in 0.0, 0.0, 0.0 coordinates, you set the X, Y, Z you want. But this will preload Animations for 1 actor, you've to preload it for each actor.. AFAIK.