11.11.2013, 20:19
you can put the stock anywhere but I suggest you to put all of your stocks on the bottom of your script, you can find them easier. When you use ApplyAnimation with 'null' as a animation name, you won't have to do animations from some library again. For example, if you write in your code this:
all animations from BEACH library will work in the first time you write your command with those animations, but all the other libraries aren't 'loaded', so you can create another stock which will load all animation libraries that you need.
pawn Код:
ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
pawn Код:
stock PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
stock PreloadAllAnimLibs(playerid)
{
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"FAT");
PreloadAnimLib(playerid,"ped");
PreloadAnimLib(playerid,"Attractors");
PreloadAnimLib(playerid,"CRIB");
PreloadAnimLib(playerid,"MISC");
PreloadAnimLib(playerid,"INT_HOUSE");
... and so on
return 1;
}