05.03.2015, 19:19
Just apply an animation in the animation library, use "null" for no animation.
Function:
In OnPlayerRequestClass to preload all animation libraries:
So what this basically does, is apply animation "null" (empty animation) in all the different animation categories(libraries).
Because for some reason you need to play the animation once where it wont work, and the next time you play the animation it will, so this just plays an empty animation for all categories, so all animations after that will work.
Function:
pawn Код:
PreloadAnimLib(playerid, animlib[]) ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0);
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,"PED"); PreloadAnimLib(playerid,"MISC");
PreloadAnimLib(playerid,"OTB"); PreloadAnimLib(playerid,"BD_Fire"); PreloadAnimLib(playerid,"BENCHPRESS");
PreloadAnimLib(playerid,"KISSING"); PreloadAnimLib(playerid,"BSKTBALL"); PreloadAnimLib(playerid,"MEDIC");
PreloadAnimLib(playerid,"SWORD"); PreloadAnimLib(playerid,"POLICE"); PreloadAnimLib(playerid,"SUNBATHE");
PreloadAnimLib(playerid,"FAT"); PreloadAnimLib(playerid,"WUZI"); PreloadAnimLib(playerid,"SWEET");
PreloadAnimLib(playerid,"ROB_BANK"); PreloadAnimLib(playerid,"GANGS"); PreloadAnimLib(playerid,"RIOT");
PreloadAnimLib(playerid,"GYMNASIUM"); PreloadAnimLib(playerid,"CAR"); PreloadAnimLib(playerid,"CAR_CHAT");
PreloadAnimLib(playerid,"GRAVEYARD"); PreloadAnimLib(playerid,"POOL");
Because for some reason you need to play the animation once where it wont work, and the next time you play the animation it will, so this just plays an empty animation for all categories, so all animations after that will work.