11.10.2009, 19:08
Hey guys .. ive modified my script from v2 to v3 Beta client and i got a simple problem . When i die or someone dies they get respawned to hospital over and over and it wont end .
Here is the hospital code:
Yes it's a GF edit.
Here is the hospital code:
Код:
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0) { if(FirstSpawn[playerid] != 1) { /*new string[256]; new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost; SafeGivePlayerMoney(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, 45.0); PlayerInfo[playerid][pInt] = 0; SendClientMessage(playerid, TEAM_CYAN_COLOR, "You have been critically wounded and have been rushed to the hospital"); SendClientMessage(playerid, TEAM_CYAN_COLOR, "You must spend some time resting here to heal your wounds"); JustDied[playerid] = 1; MedicTime[playerid] = 1; if(PlayerInfo[playerid][pDonateRank] > 0) { NeedMedicTime[playerid] = 5; } else { NeedMedicTime[playerid] = 5; } return 1; } } if(JustDied[playerid] == 1) { if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0) { SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; } SetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790); SetPlayerFacingAngle(playerid, 270.0); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; return 1; }