15.08.2014, 13:14
Quote:
|
Are you resetting the variable?
Maybe this would help (Not sure), remove the if(!gPlayerLoadedAnimLibs[playerid]) and then just add this instead: pawn Код:
Players will never have them loaded when they connected, so no need to check, it might be bugging it. |
I'll try it out and I will edit this post with the result. Thank you in advance.
Quote:
|
From Kalcor's gl_actions
Код:
new gPlayerAnimLibsPreloaded[MAX_PLAYERS];
stock PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
public OnPlayerSpawn(playerid)
{
if(!gPlayerAnimLibsPreloaded[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");
gPlayerAnimLibsPreloaded[playerid] = 1;
}
return 1;
}
public OnPlayerConnect(playerid)
{
gPlayerAnimLibsPreloaded[playerid] = 0;
return 1;
}
|
I don't want to place the preload code under OnPlayerSpawn since the classes in the class selection also perform animations.
EDIT: Stinged, it didn't work. Same problem.


