SA-MP Forums Archive
animation bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: animation bug (/showthread.php?tid=575017)



animation bug - MW - 23.05.2015

I haave this code for hospital and the animation is not working
pawn Код:
TogglePlayerControllable(playerid, 0);
            SetPlayerVirtualWorld(playerid, playerid);
            SetPlayerInterior(playerid, 18);
            SetPlayerPos(playerid, -219.265029,1410.590087,28.8);
            ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
            SetPlayerCameraPos(playerid, -220.265029,1410.590087,28.2);
            SetPlayerCameraLookAt(playerid, -219.265029,1410.590087,28.0);
            KillTimer(gHospitalTimer[playerid]);
            PlayerHospitalized[playerid] = 1;
            SendClientMessage(playerid, COLOR_LIGHTRED, "You have been killed and must spend some time in the hospital recovering.");
           
            gHospitalTimer[playerid] = SetTimerEx("OnPlayerSpawn", 60000, 0, "d", playerid);
            return 1;



Re: animation bug - Azula - 23.05.2015

PHP код:
stock PreloadAnimLib(playeridanimlib[])
        
ApplyAnimation(playeridanimlib"crckdeth2"4.010000);
PreloadAnimLib(playerid"CRACK"); 



Re: animation bug - Yashas - 23.05.2015

Load the animation libraries once when the player connects.

Check this include http://pastebin.com/QHBFwqTm to know how to preload anim libs.