SA-MP Forums Archive
Animations - 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: Animations (/showthread.php?tid=505076)



Animations - FaZeRs - 06.04.2014

So my animations is not working, i wanted so sync them so all can see them but now they are not working

Quote:

case 1: ApplyAnimation(playerid,"BEACH","bather",4.0,1,0,0 ,0,0,1);
case 2: ApplyAnimation(playerid,"BEACH","Lay_Bac_Loop",4.0 ,1,0,0,0,0,1);
case 3: ApplyAnimation(playerid,"BEACH","ParkSit_W_loop",4 .0,1,0,0,0,0,1);
case 4: ApplyAnimation(playerid,"BEACH","SitnWait_loop_W", 4.0,1,0,0,0,0,1);
case 5: ApplyAnimation(playerid,"BEACH","SitnWait_loop_W", 4.0,1,0,0,0,0,1);
case 6: ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0,1,0,0,0,0,1);

I added one more parameter for sync like in the end 1


Re: Animations - Threshold - 07.04.2014

Add this:

pawn Код:
public OnPlayerConnect(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" );
    PreloadAnimLib(playerid,"PED" );
    return 1;
}
And:
pawn Код:
PreloadAnimLib(playerid, animlib[]) ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
--
What this does is apply a null (empty) animation to your player when they connect. This way, all animations have been loaded prior to them actually being used. All animations need to be loaded before they can be used. By adding this to your OnPlayerConnect, you are Pre-loading (as the name suggests) the animations from each group. This way, you can use all animations without having to play them twice, or having them not run on a once-only basis.


Re: Animations - Mattakil - 07.04.2014

the anim isnt loaded, retyping the animation should fix the issue