Quote:
Originally Posted by =WoR=Varth
pawn Код:
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" );
|
Quote:
Originally Posted by Stigg
pawn Код:
PreloadAnimLib(playerid, animlib[]) { ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0); }
|
So your code should be something like this:
pawn Код:
public OnPlayerSpawn(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;
}
PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
Animations need to be 'loaded' in a sense, before they can be used. By applying a 'null' or empty animation from each of the categories, you are loading the animations for future use. So therefore, when you go to use an animation, it has already been loaded and will work on the first try.