07.04.2014, 01:47
Add this:
And:
--
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.
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;
}
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.