22.04.2015, 02:54
Okay so Im trying to figure out how to set the timer for when you get shot you re-spawn in that location and wait for EMS to come treat you.. Right now the EMS/FD is working but the only problem is when someone kill you, You spawn in the hospital right away.. How do i set the timer so you have time to wait for EMS/FD before bleeding out.
Here is my code i think.. i think this what i need to change :/
Im new to scripting!
P.S This my first post so Sorry in advance if i posted in the wrong format..
Here is my code i think.. i think this what i need to change :/
Код:
if(MedicTime[playerid] > 0) { if(MedicTime[playerid] == 3) { SetPlayerInterior(playerid, 5); new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X,Y,Z); SetPlayerCameraPos(playerid, X + 3, Y, Z); SetPlayerCameraLookAt(playerid,X,Y,Z); } MedicTime[playerid] ++; if(MedicTime[playerid] >= NeedMedicTime[playerid]) { new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost; GivePlayerCash(playerid, -cut); format(string, sizeof(string), "Hospital: Your medical bill comes to $%d, have a nice day.", cut); SendClientMessageEx(playerid, TEAM_CYAN_COLOR, string); TogglePlayerControllable(playerid, 1); SetPVarInt(playerid, "MedicBill", 0); MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; SpawnPlayer(playerid); } }
P.S This my first post so Sorry in advance if i posted in the wrong format..