SA-MP Forums Archive
Hospital System - 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: Hospital System (/showthread.php?tid=521560)



Hospital System - Dziugsas - 23.06.2014

Hello guys!

Im making some simple hospital system and spectacting stuff is messed up.

Whats wrong here?

And after respawn the animations are not cleared...

pawn Код:
if(PlayerInfo[playerid][Dead] == true)
    {
        TogglePlayerControllable(playerid, 0);
        ApplyAnimation(playerid,"CRACK","crckdeth2",4.0, 1, 0, 0, 0, 1);
        TogglePlayerSpectating(playerid, 1);
        PlayerSpectatePlayer(playerid, playerid);
        SetPlayerInterior(playerid,3);
        new Random = random(sizeof(LigoninesLovos));
        SetPlayerPos(playerid, LigoninesLovos[Random][0], LigoninesLovos[Random][1], LigoninesLovos[Random][2]);
        GameTextForPlayer(playerid,"~w~Gydomas",30000,6);
        SetTimerEx("HospitalHealing",30000,false,"i",playerid);
    }

forward HospitalHealing(playerid);
public HospitalHealing(playerid)
{
    PlayerInfo[playerid][Dead] = false;
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,-2647.3794,696.2032,27.9391);
    GameTextForPlayer(playerid,"~w~Pagydytas",3000,6);
    TogglePlayerControllable(playerid,1);
    TogglePlayerSpectating(playerid,0);
    SetCameraBehindPlayer(playerid);
    ClearAnimations(playerid)
    return 1;
}