try fix jail death
This commit is contained in:
@@ -24,27 +24,6 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
if (!player.IsLoggedIn()) player.Kick();
|
if (!player.IsLoggedIn()) player.Kick();
|
||||||
player.SetData("isDead", true);
|
player.SetData("isDead", true);
|
||||||
|
|
||||||
if (player.GetUser().IsAdmin(AdminLevel.ADMIN) == true)
|
|
||||||
{
|
|
||||||
player.TriggerEvent("startDeathTimer", true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.TriggerEvent("startDeathTimer", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
//var dutyMedics = 0;
|
|
||||||
//var allPlayers = NAPI.Pools.GetAllPlayers();
|
|
||||||
|
|
||||||
//foreach (Client medic in allPlayers)
|
|
||||||
//{
|
|
||||||
// if (medic.GetUser()?.FactionId == 2)
|
|
||||||
// {
|
|
||||||
// dutyMedics++;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//player.TriggerEvent("medicInfo", dutyMedics);
|
|
||||||
|
|
||||||
//TODO: Zum Full Release entfernen
|
//TODO: Zum Full Release entfernen
|
||||||
ChatService.SendMessage(player, "Du bist durch " + killer.Name + " gestorben: " + reason.ToString());
|
ChatService.SendMessage(player, "Du bist durch " + killer.Name + " gestorben: " + reason.ToString());
|
||||||
|
|
||||||
@@ -94,6 +73,15 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
};
|
};
|
||||||
Medic.AddTaskToList(reviveTask);
|
Medic.AddTaskToList(reviveTask);
|
||||||
|
|
||||||
|
if (player.GetUser().IsAdmin(AdminLevel.ADMIN) == true)
|
||||||
|
{
|
||||||
|
player.TriggerEvent("startDeathTimer", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.TriggerEvent("startDeathTimer", false);
|
||||||
|
}
|
||||||
|
|
||||||
//TODO PICTURE NOTIFICATION + SOUND für Medics
|
//TODO PICTURE NOTIFICATION + SOUND für Medics
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,6 +110,8 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
Jail.Check_PutBehindBars(player);
|
Jail.Check_PutBehindBars(player);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[RemoteEvent("RespawnPlayerAtHospital")]
|
[RemoteEvent("RespawnPlayerAtHospital")]
|
||||||
public void RespawnPlayerAtHospital(Client player)
|
public void RespawnPlayerAtHospital(Client player)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ namespace ReallifeGamemode.Server.Wanted
|
|||||||
|
|
||||||
client.SetData("isDead", false);
|
client.SetData("isDead", false);
|
||||||
client.RemoveAllWeapons();
|
client.RemoveAllWeapons();
|
||||||
|
client.Health = 100;
|
||||||
|
client.Armor = 0;
|
||||||
Random rnd = new Random();
|
Random rnd = new Random();
|
||||||
int rndInt = rnd.Next(1, 3);
|
int rndInt = rnd.Next(1, 3);
|
||||||
if (rndInt == 1)
|
if (rndInt == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user