Fix Medic v3

This commit is contained in:
VegaZ
2021-02-08 18:54:35 +01:00
parent 8169ba60f8
commit 98ba18ae1d
2 changed files with 7 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ export default function deathScreen() {
var deathDate: Date; var deathDate: Date;
var taskTimeout = false; var taskTimeout = false;
const maxDeathTime = 30; const maxDeathTime = 30;
const medicJobTime = maxDeathTime * 2; const medicJobTime = maxDeathTime * -1;
mp.game.gameplay.setFadeOutAfterDeath(false); mp.game.gameplay.setFadeOutAfterDeath(false);
@@ -111,11 +111,11 @@ export default function deathScreen() {
mp.game.graphics.drawRect(0.5, 0.5, 1, 1, 0, 0, 0, alpha); mp.game.graphics.drawRect(0.5, 0.5, 1, 1, 0, 0, 0, alpha);
} else { } else {
mp.events.call("respawnDeathPlayer"); mp.events.call("respawnDeathPlayer");
} }
} else { } else {
if (deathSeconds > medicJobTime && taskTimeout == false) { if (deathSeconds < medicJobTime && taskTimeout == false) {
mp.events.callRemote("medicTaskTimeout"); mp.events.callRemote("medicTaskTimeout");
} }
} }
}); });

View File

@@ -97,20 +97,20 @@ namespace ReallifeGamemode.Server.Factions.Medic
{ {
case 0: case 0:
ReviveTasks[index].MedicName = victimName; ReviveTasks[index].MedicName = player.Name;
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Reviveauftrag von " + victimName + " angenommen.", new List<int>() { 2 }); ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Reviveauftrag von " + victimName + " angenommen.", new List<int>() { 2 });
target.SendNotification("~w~Sanitäter~g~ " + player.Name + "~w~ eilt zur Rettung."); target.SendNotification("~w~Sanitäter~g~ " + player.Name + "~w~ eilt zur Rettung.");
break; break;
case 1: case 1:
HealTasks[index].MedicName = victimName; HealTasks[index].MedicName = player.Name;
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Healauftrag von " + victimName + " angenommen.", new List<int>() { 2 }); ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " hat den Healauftrag von " + victimName + " angenommen.", new List<int>() { 2 });
target.SendNotification("~w~Sanitäter~g~ " + player.Name + "~w~ hat deinen Auftrag angenommen."); target.SendNotification("~w~Sanitäter~g~ " + player.Name + "~w~ hat deinen Auftrag angenommen.");
break; break;
case 2: case 2:
FireTasks[index].MedicName = victimName; FireTasks[index].MedicName = player.Name;
break; break;
} }
} }