27.05.2016, 12:15
Hello!
I have a stock which is making the player reloading. The player doing the animation, but he still with the animation.
I also try to set ClearAnimations(playerid) but like me though, this canceling player's animation. I, also, changed "timer" to try what change. Set to 1 second, do nothing. Set to 1 ms, cancel animation.
I don't want to set any timers.
Thanks for your help!
I have a stock which is making the player reloading. The player doing the animation, but he still with the animation.
I also try to set ClearAnimations(playerid) but like me though, this canceling player's animation. I, also, changed "timer" to try what change. Set to 1 second, do nothing. Set to 1 ms, cancel animation.
I don't want to set any timers.
Thanks for your help!
PHP код:
stock SetAnimationForWeapon(playerid, weaponid)
{
switch(weaponid)
{
case 22: ApplyAnimation(playerid, "COLT45", "colt45_reload", 4.1, 0, 1, 1, 0, 1);
case 23: ApplyAnimation(playerid, "SILENCED", "Silence_reload", 4.1, 0, 1, 1, 0, 1);
case 24: ApplyAnimation(playerid, "PYTHON", "python_reload", 4.1, 0, 1, 1, 0, 1);
case 25, 27: ApplyAnimation(playerid, "BUDDY", "buddy_reload", 4.1, 0, 1, 1, 0, 1);
case 26: ApplyAnimation(playerid, "COLT45", "sawnoff_reload", 4.1, 0, 1, 1, 0, 1);
case 29..31, 33, 34: ApplyAnimation(playerid, "RIFLE", "rifle_load", 4.1, 0, 1, 1, 1, 1);
case 28, 32: ApplyAnimation(playerid, "TEC", "tec_reload", 4.1, 0, 1, 1, 1, 1);
//ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
}
return 1;
}