04.09.2015, 09:32
More easier way of preloading anims
Probably better than his way, you'll be using way less lines if you want to preload more animations.
PHP код:
// Somewhere in your script
static const AnimLibs[][] =
{
"BOMBER", "RAPPING", "SHOP", "BEACH", "SMOKING", "FOOD", "ON_LOOKERS",
"DEALER", "CRACK", "CARRY", "COP_AMBIENT", "PARK", "INT_HOUSE", "FOOD",
"DANCING", "ped", "TEC", "CASINO", "VENDING", "HEIST9", "PARACHUTE",
"GYMNASIUM", "MISC", "SWORD", "CHAINSAW"
};
PreloadAnimLibFor(id)
{
for(new i = 0, len = sizeof(AnimLibs); i < len; i++)
{
ApplyAnimation(id, AnimLibs[i], "null", 0.0, 0, 0, 0, 0, 0, 0);
}
}
// OnPlayerConnect
PreloadAnimLibFor(playerid);