23.02.2012, 23:34
Ok I made a death system for an rp server, what it does is on OnPlayerDeath it checks what level you are, if your level is less then 3 you don't get charged anything, after that you will be "in the hospital" for 3 minutes, but I wan't to know is it possible to get rid of the thing at the bottom of the screen with the arrows and the spawn button.
Here is the code
Here is the code
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerInfo[playerid][pLevel] <= 3)
{
SetPlayerPos(playerid, 2002.3518, -1447.4727, 8.0220);
SetPlayerCameraLookAt(playerid, 2033.5793, -1402.8020, 17.8498);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, 0xFC3F3FAA, " You have been rushed to the emergency room! you will spend some time here while you recover ((3 minutes)) ");
SendClientMessage(playerid, 0xFC3F3FAA, " Due to being lower then level 3 your hospital bills were payed by the state!");
SetTimer("dtimer", 180000, false);
}
else
{
SetPlayerPos(playerid, 2002.3518, -1447.4727, 8.0220);
SetPlayerCameraLookAt(playerid, 2033.5793, -1402.8020, 17.8498);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, 0xFC3F3FAA, " You have been rushed to the emergency room! you will spend some time here while you recover ((3 minutes)) ");
SendClientMessage(playerid, 0xFC3F3FAA, " You will be charged 450 dollars for your trip to the hospital");
SetTimer("dtimer", 180000, false);
}
return 1;
}
forward dtimer(playerid);
public dtimer(playerid)
{
SendClientMessage(playerid, 0xFC3F3FAA, " Yoou have been discharged from the hospital please remember you have lost thirty minutes of your memory");
SendClientMessage(playerid, 0xFCF3FAA, " including who killed you! If you Revenge Kill you will be prisoned");
SetPlayerPos(playerid, 2033.4850,-1404.9219,17.2470);
SetCameraBehindPlayer(playerid);
SpawnPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}