29.03.2019, 08:12
Quote:
Hello,
@Crayder here are my codes. public OnPlayerSpawn(playerid) { SetPlayerPos(playerid, 2616.5447,2453.2605,14.8672); return 1; } public OnPlayerDeath(playerid, killerid, reason) { SetPlayerPos(playerid, 10.2967,148.8675,999.0613); SetPlayerHealth(playerid, 100); GivePlayerMoney(playerid, -500); SendClientMessage(playerid, -1,"DOCTOR: You have paid your medical bill."); return 1; } |
PHP Code:
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 2616.5447,2453.2605,14.8672);
return 1;
}
add this on the top of the script, under includes
PHP Code:
new Hospitalized[MAX_PLAYERS];
PHP Code:
public OnPlayerDeath(playerid, killerid, reason)
{
Hospitalized[playerid] = 1;
SetPlayerPos(playerid, 10.2967,148.8675,999.0613);
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, -1,"DOCTOR: You have paid your medical bill.");
return 1;
}
PHP Code:
public OnPlayerSpawn(playerid)
{
if(Hospitalized[playerid]){
SetPlayerPos(playerid, 10.2967,148.8675,999.0613);
}else{
SetPlayerPos(playerid, 2616.5447,2453.2605,14.8672);
}
return 1;
}