Preloading animations
#1

What am I doing wrong?

OnPlayerSpawn:
pawn Code:
if(! plAnimationsPreLoaded [ 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");
        plAnimationsPreLoaded [ playerid ] = 1;
    }
pawn Code:
PreloadAnimLib(playerid, animlib[])
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}

So my question is, why won't this work?
pawn Code:
if( plJustDied [ playerid ] == true )
    {
        SetPlayerPos( playerid, plDeathPosition [ playerid ] [ 0 ], plDeathPosition [ playerid ] [ 1 ], plDeathPosition [ playerid ] [ 2 ] - 0.95 );
        SetPlayerFacingAngle( playerid, plDeathPosition [ playerid ] [ 3 ] );
        SetPlayerInterior( playerid, plDeathInterior [ playerid ] );
        SetPlayerVirtualWorld( playerid, plDeathVirtualWorld [ playerid ] );
       
        TogglePlayerControllable( playerid, false );
       
        ApplyAnimation( playerid, "SWAT", "Rail_fall_crawl", 4.1, 1, 1, 1, 1, 0, 1 );
        ApplyAnimation( playerid, "SWAT", "Rail_fall_crawl", 4.1, 1, 1, 1, 1, 0, 1 );
       
        SendClientMessage( playerid, -1, "* You have been severely injured. Roleplay your injuries and then type "#Int_RankOrange"/acceptdeath "#Int_White"to be transported to a hospital." );
    }
Everything but the animations work, but the thing is, once the player has died once, the animations work.
Reply


Messages In This Thread
Preloading animations - by 2KY - 13.09.2012, 19:53
Re: Preloading animations - by HuSs3n - 13.09.2012, 20:31
Re: Preloading animations - by 2KY - 13.09.2012, 21:12

Forum Jump:


Users browsing this thread: 1 Guest(s)