Anim bug
#1

Good evening.

I am looking for a method to correct the problems animations.

In fact I have to do twice the animation to take place.

Thx.
Reply
#2

You need to pre-load the animations set. You can find that code in gl-actions filterscript by SA-MP.


pawn Код:
new bool:gPlayerAnimLibsPreloaded[MAX_PLAYERS];

PreloadAnimLib(playerid, animlib[])
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}

public OnPlayerConnect(playerid)
{
    gPlayerAnimLibsPreloaded[playerid] = false;
   
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(!gPlayerAnimLibsPreloaded[playerid]) {
        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");
        gPlayerAnimLibsPreloaded[playerid] = true;
    }
    return 1;
}
That's pretty much it.
Reply
#3

Not work.
Reply
#4

Quote:
Originally Posted by TheSy
Посмотреть сообщение
Not work.
You probably didn't preload it if it had different library name because I just gave you an example on how to preload animations, from there you have to figure it out.

Not sure? Show me the animation you are applying 2 times.
Reply
#5

I use an animation of the bomber library, and still the same problems, even with pre-loaded.
Reply
#6

put this under OnPlayerConnect--
ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0, 0,0);
Reply
#7

Not work
Reply


Forum Jump:


Users browsing this thread: