SA-MP Forums Archive
Wave animation is playing after it has been used - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Wave animation is playing after it has been used (/showthread.php?tid=503354)



Wave animation is playing after it has been used - Admigo - 29.03.2014

Heey all,

I have a problem with my wave command.
When i use /wave its not playing the animation but when i use it again it will be played normal.
How to fix this?
Код:
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave
Admigo


Re: Wave animation is playing after it has been used - DexterC - 29.03.2014

Quote:
Originally Posted by Admigo
Посмотреть сообщение
Heey all,

I have a problem with my wave command.
When i use /wave its not playing the animation but when i use it again it will be played normal.
How to fix this?
Код:
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave
Admigo
This happens to me sometimes, the command needs to be typed twice for the animation to start, what you can try doing is, try applying the animation twice and check if it works.

Like:

pawn Код:
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave



Re: Wave animation is playing after it has been used - Guest4390857394857 - 29.03.2014

this happened to me for lot of anims,,, i thought it may be samp bug!


Re: Wave animation is playing after it has been used - Admigo - 29.03.2014

Quote:
Originally Posted by DexterC
Посмотреть сообщение
This happens to me sometimes, the command needs to be typed twice for the animation to start, what you can try doing is, try applying the animation twice and check if it works.

Like:

pawn Код:
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave
Thanks, i will try that.
EDIT: Not working


Re: Wave animation is playing after it has been used - Pillhead2007 - 29.03.2014

use ClearAnimations(playerid); before applying a new animation


Re: Wave animation is playing after it has been used - iThePunisher - 29.03.2014

this is how i fixed the same bug i had like you Admigo
Just put the animation twice
Example:
pawn Код:
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 2000,1); // Wave
Or
pawn Код:
PreloadAnimLib(playerid, animlib[]) ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);

public OnPlayerConnect(playerid)
{   //loading the animation libraries
    PreloadAnimLib(playerid,"BOMBER");
    PreloadAnimLib(playerid,"RAPPING");
    PreloadAnimLib(playerid,"SHOP");
    PreloadAnimLib(playerid,"BEACH");
    PreloadAnimLib(playerid,"SMOKING");
    PreloadAnimLib(playerid,"FOOD");
    PreloadAnimLib(playerid,"ON_LOOKERS");
    PreloadAnimLib(playerid,"DEALER");
    PreloadAnimLib(playerid,"CRACK");
    PreloadAnimLib(playerid,"CARRY");
    PreloadAnimLib(playerid,"COP_AMBIENT");
    PreloadAnimLib(playerid,"PARK");
    PreloadAnimLib(playerid,"INT_HOUSE");
    PreloadAnimLib(playerid,"FOOD");
    PreloadAnimLib(playerid,"PED");
    return 1;
}



Re: Wave animation is playing after it has been used - EiresJason - 29.03.2014

Try this.

Also, make sure you get the preload libraries.
pawn Код:
ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 0, 0, 0, 0, 2000,1); // Wave