try fix
This commit is contained in:
@@ -58,7 +58,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,16 +121,22 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
public static String GetWeaponNameByHash(uint hash)
|
||||
{
|
||||
if (!IsValidHash(hash))
|
||||
return "unbekannt";
|
||||
|
||||
foreach (string w in _modWeapons)
|
||||
foreach (WeaponHash vh in Enum.GetValues(typeof(WeaponHash)))
|
||||
{
|
||||
if(NAPI.Util.GetHashKey(w) == hash)
|
||||
if ((uint)vh == hash)
|
||||
{
|
||||
return w;
|
||||
foreach (string w in _modWeapons)
|
||||
{
|
||||
if (NAPI.Util.GetHashKey(w) == hash)
|
||||
{
|
||||
return w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return "unbekannt";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user