11.11.2013, 18:13
Can somebody tell me how to fix animation problem, it only works when i type the command 2 times, not from the first time.
stock PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
pawn Код:
|
PreloadAnimLib(playerid, animlib[]);
// global:
new
bool: First_Spawn[ MAX_PLAYERS char ]
;
// OnPlayerConnect:
First_Spawn{ playerid } = true;
// OnPlayerSpawn:
if( First_Spawn{ playerid } )
{
PreloadAnimLib( playerid, "PED" );
First_Spawn{ playerid } = false;
}
// Where you want to use the animation
ApplyAnimation( playerid, "PED", "cower", 1, 1, 0, 0, 0, 0, 1 );
// at the bottom:
stock PreloadAnimLib( playerid, animlib[ ] )
{
ApplyAnimation( playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0) ;
}
ApplyAnimation(playerid,"BEACH","null",0.0,0,0,0,0,0);
stock PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
stock PreloadAllAnimLibs(playerid)
{
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"FAT");
PreloadAnimLib(playerid,"ped");
PreloadAnimLib(playerid,"Attractors");
PreloadAnimLib(playerid,"CRIB");
PreloadAnimLib(playerid,"MISC");
PreloadAnimLib(playerid,"INT_HOUSE");
... and so on
return 1;
}