21.03.2010, 09:42
When player dies this happens backs to backs here and image
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, 50.0); SetPlayerInterior(playerid, 0); PlayerInfo[playerid][pInt] = 0; TogglePlayerControllable(playerid, 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; SetPlayerPos(playerid, -2685.5029,638.3383,14.4531); if(PlayerInfo[playerid][pDonateRank] > 0) { NeedMedicTime[playerid] = 10; } else { NeedMedicTime[playerid] = 10; } return 1; } } if(JustDied[playerid] == 1) { if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0) { SetPlayerVirtualWorld(playerid, 0); PlayerInfo[playerid][pVirWorld] = 0; } SetPlayerPos(playerid,-2685.5029,638.3383,14.4531); SetPlayerFacingAngle(playerid, 270.0); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; return 1; } return 1; }
if(MedicTime[i] > 0) { if(MedicTime[i] == 3) { SetPlayerInterior(i, 5); new Float:X, Float:Y, Float:Z; GetPlayerPos(i, X,Y,Z); SetPlayerCameraPos(i, X + 3, Y, Z); SetPlayerCameraLookAt(i,X,Y,Z); } MedicTime[i] ++; if(MedicTime[i] >= NeedMedicTime[i]) { new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost; //SafeGivePlayerMoney(i, -cut); format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, Have a nice day.", cut); SendClientMessage(i, TEAM_CYAN_COLOR, string); TogglePlayerControllable(i, 1); MedicBill[i] = 0; MedicTime[i] = 0; NeedMedicTime[i] = 0; PlayerInfo[i][pDeaths] += 1; PlayerFixRadio(i); ClearAnimations(i); SpawnPlayer(i); SetPlayerSpawn(i); SetCameraBehindPlayer(i); } }