Fix last bugs
This commit is contained in:
@@ -485,6 +485,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
mp.events.add("destroyMedicTaskCheckpoint", () => {
|
mp.events.add("destroyMedicTaskCheckpoint", () => {
|
||||||
activeCheckpoint.destroy();
|
activeCheckpoint.destroy();
|
||||||
activeTask = false;
|
activeTask = false;
|
||||||
|
timeLeft = 0;
|
||||||
mp.events.callRemote("MedicTaskTimeout");
|
mp.events.callRemote("MedicTaskTimeout");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -496,6 +497,7 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
mp.events.callRemote("PayCutMedicEarnings");
|
mp.events.callRemote("PayCutMedicEarnings");
|
||||||
activeTask = false;
|
activeTask = false;
|
||||||
deadRespawned = false;
|
deadRespawned = false;
|
||||||
|
timeLeft = 0;
|
||||||
} else {
|
} else {
|
||||||
mp.gui.chat.push("DEBUG: Checkpoint VOR wiederbelebung des Spielers betreten")
|
mp.gui.chat.push("DEBUG: Checkpoint VOR wiederbelebung des Spielers betreten")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,13 +158,14 @@ namespace ReallifeGamemode.Server.Factions.Medic
|
|||||||
using var dbContext = new DatabaseContext();
|
using var dbContext = new DatabaseContext();
|
||||||
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += Medic.ReviveIncome / 2;
|
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += Medic.ReviveIncome / 2;
|
||||||
player.SendNotification($"Du hast den Einsatzort erreicht und ~g~{Medic.ReviveIncome / 2}$ ~s~für die Fraktion verdient.");
|
player.SendNotification($"Du hast den Einsatzort erreicht und ~g~{Medic.ReviveIncome / 2}$ ~s~für die Fraktion verdient.");
|
||||||
|
Medic.delReviveTaskMedic(player);
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("MedicTaskTimeout")]
|
[RemoteEvent("MedicTaskTimeout")]
|
||||||
public void RemoveMedicTask(Player player)
|
public void RemoveMedicTask(Player player)
|
||||||
{
|
{
|
||||||
Medic.delReviveTask(player);
|
Medic.delReviveTaskMedic(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UpdateDutyMedics(int modifier)
|
public static void UpdateDutyMedics(int modifier)
|
||||||
|
|||||||
Reference in New Issue
Block a user