(05/05/2022 01:03)xbruno1000x Escreveu: Tenta fazer de uma forma mais devagar. Coloca um timer e chama as libs devagar.
Define para fazer isso:
Código:#define PreloadAnimLib(%1,%2) ApplyAnimation(%1,%2,"null",0.0,0,0,0,0,0)
Como aplicar:
No caso acima, todas libs foram carregadas de uma vez, porém você pode alterar a estrutura da stock para carregar 1 de cada vez de x em x tempo.Código:PreloadPlayerAnims(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");
}
Sabe um jeito fácil de dividir:
Código:
new const AnimLibs[][] = {
"AIRPORT", "ATTRACTORS", "BAR", "BASEBALL", "BD_FIRE",
"BEACH", "BENCHPRESS", "BF_INJECTION", "BIKE_DBZ", "BIKED",
"BIKEH", "BIKELEAP", "BIKES", "BIKEV", "BLOWJOBZ",
"BMX", "BOMBER", "BOX", "BSKTBALL", "BUDDY",
"BUS", "CAMERA", "CAR", "CAR_CHAT", "CARRY",
"CASINO", "CHAINSAW", "CHOPPA", "CLOTHES", "COACH",
"COLT45", "COP_AMBIENT", "COP_DVBYZ", "CRACK", "CRIB",
"DAM_JUMP", "DANCING", "DEALER", "DILDO", "DODGE",
"DOZER", "DRIVEBYS", "FAT", "FIGHT_B", "FIGHT_C",
"FIGHT_D", "FIGHT_E", "FINALE", "FINALE2", "FLAME",
"FLOWERS", "FOOD", "FREEWEIGHTS", "GANGS", "GFUNK",
"GHANDS", "GHETTO_DB", "GOGGLES", "GRAFFITI", "GRAVEYARD",
"GRENADE", "GYMNASIUM", "HAIRCUTS", "HEIST9", "INT_HOUSE",
"INT_OFFICE", "INT_SHOP", "JST_BUISNESS", "KART", "KISSING",
"KNIFE", "LAPDAN1", "LAPDAN2", "LAPDAN3", "LOWRIDER",
"MD_CHASE", "MD_END", "MEDIC", "MISC", "MTB",
"MUSCULAR", "NEVADA", "ON_LOOKERS", "OTB", "PARACHUTE",
"PARK", "PAULNMAC", "PED", "PLAYER_DVBYS", "PLAYIDLES",
"POLICE", "POOL", "POOR", "PYTHON", "QUAD",
"QUAD_DBZ", "RAPPING", "RIFLE", "RIOT", "ROB_BANK",
"ROCKET", "RUNNINGMAN", "RUSTLER", "RYDER", "SCRATCHING",
"SEX", "SHAMAL", "SHOP", "SHOTGUN", "SILENCED",
"SKATE", "SMOKING", "SNIPER", "SNM", "SPRAYCAN",
"STRIP", "SUNBATHE", "SWAT", "SWEET", "SWIM",
"SWORD", "TANK", "TATTOOS", "TEC", "TRAIN",
"TRUCK", "UZI", "VAN", "VENDING", "VORTEX",
"WAYFARER", "WEAPONS", "WOP", "WUZI"
};
Código:
stock CarregarAnims(playerid) {
for(new i = 0; i < sizeof(AnimLibs); i++) {
ApplyAnimation(playerid, AnimLibs[i], "null", 4.0, 0, 0, 0, 0, 0, 1);
}
return 1;
}
Em quatro partes ao invés de 2?
Código:
stock CarregarAnims1(playerid) {
new END = sizeof(AnimLibs) / 2;
for(new i = 0; i < END; i++) {
ApplyAnimation(playerid, AnimLibs[i], "null", 4.0, 0, 0, 0, 0, 0, 1);
}
return 1;
}
stock CarregarAnims2(playerid) {
new START = sizeof(AnimLibs) / 2;
for(new i = START; i < sizeof(AnimLibs); i++) {
ApplyAnimation(playerid, AnimLibs[i], "null", 4.0, 0, 0, 0, 0, 0, 1);
}
return 1;
}