Add revive-Sperre

This commit is contained in:
VegaZ
2021-04-05 17:55:23 +02:00
parent e02a6b6af7
commit 8a0820541e
2 changed files with 26 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ namespace ReallifeGamemode.Server.Events
player.Kick();
return;
}
player.SetData("isDead", true);
@@ -42,9 +43,6 @@ namespace ReallifeGamemode.Server.Events
userDeath.SaveChanges();
}
//TODO: Zum Full Release entfernen
if (player.HasData("togdeath")) {
ChatService.SendMessage(player, "Du bist durch " + (killer?.Name ?? "Niemanden") + " gestorben: " + reason.ToString());
@@ -92,21 +90,26 @@ namespace ReallifeGamemode.Server.Events
if (user.JailTime <= 0)
{
//MEDIC AUFTRAG
MedicTask reviveTask = new MedicTask()
if (!player.HasData("reviveSperre"))
{
Victim = player.Name,
Position = player.Position,
CauseOfDeath = reason.ToString(),
Caller = null,
Description = "Gestorben",
Time = DateTime.Now,
Type = MedicTaskType.REVIVE,
MedicName = "none"
};
Medic.AddTaskToList(reviveTask);
Medic.delHealTask(player);
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " ist soeben verstorben.", new List<int>() { 2 });
//MEDIC AUFTRAG
MedicTask reviveTask = new MedicTask()
{
Victim = player.Name,
Position = player.Position,
CauseOfDeath = reason.ToString(),
Caller = null,
Description = "Gestorben",
Time = DateTime.Now,
Type = MedicTaskType.REVIVE,
MedicName = "none"
};
Medic.AddTaskToList(reviveTask);
Medic.delHealTask(player);
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " ist soeben verstorben.", new List<int>() { 2 });
}
if (player.GetUser().IsAdmin(AdminLevel.ADMIN) == true)
{