21.03.2010, 07:26
How do i make it so player die he goes to hospital
I had this but when player first login he/she be in hospital
Please Help Me Its Urgent...
I had this but when player first login he/she be in hospital
Код:
public OnPlayerDeath(playerid, killerid, reason) { new string[256]; new cut = 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, 50); SetPlayerInterior(playerid, 18); SetPlayerPos(playerid, -219.2650,1410.5901,28.8000); // Warp the player SetPlayerFacingAngle(playerid, 270.0); TogglePlayerControllable(playerid, 0); LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack 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); SetPlayerPos(playerid,2338.6531,-1256.6045,22.5000); return 1; } } } if(killerid != 255) { if(GetPlayerState(killerid) == 2) { SendClientMessage(killerid, COLOR_YELLOW, "DriveBy Kill, dont abuse it, On foot gets you $$$!"); return 1; } }