06.08.2013, 15:02
So when I type /kill I just respawn normally without getting taken to the hospital first
And yes my pSpawn value is 1
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;
}

