From efdf94dd8a284a59d6f3e1daac9daa9cb28e9610 Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Fri, 13 Dec 2019 19:24:08 +0100 Subject: [PATCH] fix --- ReallifeGamemode.Server/Events/Death.cs | 6 ++---- ReallifeGamemode.Server/Managers/WeaponManager.cs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 1f9afb7a..8970622b 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -57,10 +57,8 @@ namespace ReallifeGamemode.Server.Events if (player != killer) { Autowanted.Check_AutoWanted(killer, player); - //string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet (" + NAPI.Player.GetPlayerCurrentWeapon(killer) + ")"; - string weaponHash = NAPI.Player.GetPlayerCurrentWeapon(killer).ToString(); - ChatService.Broadcast("test: " + weaponHash); - string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet (" + Managers.WeaponManager.GetWeaponNameByHash((uint)killer.Weapons.GetHashCode()) + ")"; + + string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet (" + Managers.WeaponManager.GetWeaponNameByHash((uint)NAPI.Player.GetPlayerCurrentWeapon(killer)) + ")"; ChatService.BroadcastAdmin(message, AdminLevel.ADMIN); } } diff --git a/ReallifeGamemode.Server/Managers/WeaponManager.cs b/ReallifeGamemode.Server/Managers/WeaponManager.cs index 7a97cc73..3437b400 100644 --- a/ReallifeGamemode.Server/Managers/WeaponManager.cs +++ b/ReallifeGamemode.Server/Managers/WeaponManager.cs @@ -124,7 +124,7 @@ namespace ReallifeGamemode.Server.Managers if (!IsValidHash(hash)) return "unbekannt"; - foreach (var w in _modWeapons) + foreach (string w in _modWeapons) { if(NAPI.Util.GetHashKey(w) == hash) {