Player To Interior Hospital when dies
#1

I have some problemes with getting a player in to hospital when he dies, can someone please help me .

{
new string[256];
new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
GivePlayerMoney(playerid, -cut);
format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerHealth(playerid, 100);
SetPlayerInterior(playerid, 5);
rand = random(sizeof(gMedicSpawns));
SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // WarpThPl
SetPlayerFacingAngle(playerid, 270.0);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from your ~r~wounds~y~...", 35000, 3);
MedicTime[playerid] = 1;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
NeedMedicTime[playerid] = 30;
}
else
{
NeedMedicTime[playerid] = 60;
}
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
return 1;
}

Greats Delow
Reply
#2

Ask in GF/ModernTopia/Citywide Topic
Reply
#3

idk if this is too late but you want SetPlayerPos(playerid, x , y , z you know the cordenades),
but if you dont have the interior allready made you will have to map it and set a TP Point that goes in and out of thehopistal
Interior this is if you want it to be in the hospital for a couple secs or if you want him to spawn there e.t.c
i hope you get the idea is all about SetPlayerPos and Timers
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)