Don't get teleported to hospital after dieing
#1

So when I type /kill I just respawn normally without getting taken to the hospital first

And yes my pSpawn value is 1

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(PlayerInfo[playerid][pSpawn] == 1 || PlayerInfo[playerid][pSpawn] == 4)
    {
        SetPVarInt(playerid, "hospitalls", 1);
    }
    return 1;
}
Код:
public OnPlayerSpawn(playerid)
{
    if(GetPVarInt(playerid, "hospitalls") == 1)
    {
        SetPVarInt(playerid, "hospitalls", 0);
        SetPlayerPos(playerid, 1176.90, -1323.50, 14.04);
        ResetPlayerWeapons(playerid);
        SendClientMessage(playerid, -1, "You have immediately been sent to the All Saints General hospital after you had been found dead.");
        if(GetPlayerMoney(playerid) < 2500)
        {
            SendClientMessage(playerid, -1, "The doctors have taken away your weapons and since you could not pay the {1AE888}$2500 {FFFFFF}bill you have been spawned with less health.");
            SetPlayerHealth(playerid, 25.0);
        }
        else
        {
            GivePlayerMoney(playerid, -2500);
            SendClientMessage(playerid, -1, "The doctors have taken away your weapons and have charged you {1AE888}$2500 {FFFFFF}for their work.");
            SetPlayerHealth(playerid, 60.0);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Don't get teleported to hospital after dieing - by Sellize - 06.08.2013, 15:02
Re: Don't get teleported to hospital after dieing - by ThePhenix - 06.08.2013, 15:11
Re: Don't get teleported to hospital after dieing - by Sellize - 07.08.2013, 10:39
Re: Don't get teleported to hospital after dieing - by Sellize - 07.08.2013, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)