try fix
This commit is contained in:
@@ -58,7 +58,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
{
|
{
|
||||||
Autowanted.Check_AutoWanted(killer, player);
|
Autowanted.Check_AutoWanted(killer, player);
|
||||||
|
|
||||||
string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet (" + Managers.WeaponManager.GetWeaponNameByHash((uint)NAPI.Player.GetPlayerCurrentWeapon(killer)) + ")";
|
string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet (" + Managers.WeaponManager.GetWeaponNameByHash(NAPI.Player.GetPlayerCurrentWeapon(killer)) + ")";
|
||||||
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN);
|
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,9 +121,10 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
|
|
||||||
public static String GetWeaponNameByHash(uint hash)
|
public static String GetWeaponNameByHash(uint hash)
|
||||||
{
|
{
|
||||||
if (!IsValidHash(hash))
|
foreach (WeaponHash vh in Enum.GetValues(typeof(WeaponHash)))
|
||||||
return "unbekannt";
|
{
|
||||||
|
if ((uint)vh == hash)
|
||||||
|
{
|
||||||
foreach (string w in _modWeapons)
|
foreach (string w in _modWeapons)
|
||||||
{
|
{
|
||||||
if (NAPI.Util.GetHashKey(w) == hash)
|
if (NAPI.Util.GetHashKey(w) == hash)
|
||||||
@@ -131,6 +132,11 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return "unbekannt";
|
return "unbekannt";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user