Anim bug - 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: Anim bug (
/showthread.php?tid=521151)
Anim bug -
TheSy - 22.06.2014
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.
Re: Anim bug -
Cypress - 22.06.2014
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.
Re: Anim bug -
TheSy - 22.06.2014
Not work.
Re: Anim bug -
Cypress - 22.06.2014
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.
Re: Anim bug -
TheSy - 22.06.2014
I use an animation of the bomber library, and still the same problems, even with pre-loaded.
Re: Anim bug -
BroZeus - 22.06.2014
put this under OnPlayerConnect--
ApplyAnimation(playerid,"BOMBER","null",0.0,0,0,0, 0,0);
Re: Anim bug -
TheSy - 25.06.2014
Not work