diff --git a/ReallifeGamemode.Client/Interaction/factioninteraction.ts b/ReallifeGamemode.Client/Interaction/factioninteraction.ts index 7246b29b..15acd63c 100644 --- a/ReallifeGamemode.Client/Interaction/factioninteraction.ts +++ b/ReallifeGamemode.Client/Interaction/factioninteraction.ts @@ -495,8 +495,8 @@ export default function factionInteraction(globalData: IGlobalData) { timeLeft = 0; } else if (activeTask.Type == 1){ activeCheckpoint.destroy(); - activeTask = null; - mp.events.callRemote("delHealTask"); + mp.events.callRemote("delHealTaskAsMedic", activeTask.Victim); + activeTask = null; } }); diff --git a/ReallifeGamemode.Client/util/Gangwar.ts b/ReallifeGamemode.Client/util/Gangwar.ts index 532fa14c..68d62d37 100644 --- a/ReallifeGamemode.Client/util/Gangwar.ts +++ b/ReallifeGamemode.Client/util/Gangwar.ts @@ -76,8 +76,8 @@ mp.keys.bind(0x65, false, function () { //NUM0 mp.keys.bind(0x60, false, function () { if (gzEdit && editorState == 1 && editPoint == null) { - editorState = 2; - squarItUp(); + reloadGangZoneEditor(); + gzEdit = false; } }); @@ -224,9 +224,9 @@ function renderVisualHelp() { centre: false }); } else if (editorState == 1) { - if (editPoint != null) { - mp.game.graphics.drawText("Welchen Eckpunkt möchtest du bearbeiten? Drücke ~g~NUM1-4\n"+ - "~s~Oder drücke ~g~NUM-0 ~s~ für die Finalisierung", [editVisualHelpX, editVisualHelpY], + if (editPoint == null) { + mp.game.graphics.drawText("Welchen Eckpunkt möchtest du bearbeiten? \nDrücke ~g~NUM1-4\n"+ + "~s~Oder drücke ~g~NUM-0 ~s~ zum Beenden", [editVisualHelpX, editVisualHelpY], { font: 0, color: [255, 255, 255, 255], diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index d3b13554..99075bdd 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -125,11 +125,19 @@ namespace ReallifeGamemode.Server.Factions.Medic [RemoteEvent("delHealTask")] public static void delHealTask(Player player) { - MedicTask task = HealTasks.FirstOrDefault(t => t.Victim == player.Name || t.MedicName == player.Name); + MedicTask task = HealTasks.FirstOrDefault(t => t.Victim == player.Name); RemoveTaskFromList(task); player.SetData("healauftrag", false); } - + + [RemoteEvent("delHealTaskAsMedic")] + public static void delHealTaskAsMedic(Player player, string victimName) + { + MedicTask task = HealTasks.FirstOrDefault(t => t.Victim == victimName); + RemoveTaskFromList(task); + player.SetData("healauftrag", false); + } + [RemoteEvent("delReviveTask")] public static void delReviveTask(Player player) {