nur bestimmte waffen für unter 1337
This commit is contained in:
@@ -105,6 +105,26 @@ namespace ReallifeGamemode.Server.Managers
|
||||
"militaryrifle"
|
||||
};
|
||||
|
||||
private static readonly List<string> _restrictedWeapons = new List<string>()
|
||||
{
|
||||
"bat",
|
||||
"flashlight",
|
||||
"knuckle",
|
||||
"nightstick",
|
||||
"pistol",
|
||||
"pistol_mk2",
|
||||
"combatpistol",
|
||||
"stungun",
|
||||
"pistol50",
|
||||
"smg",
|
||||
"assaultsmg",
|
||||
"combatpdw",
|
||||
"pumpshotgun",
|
||||
"assaultrifle",
|
||||
"carbinerifle",
|
||||
"sniperrifle"
|
||||
};
|
||||
|
||||
private static readonly Dictionary<uint, string> causeOfDeath = new Dictionary<uint, string>()
|
||||
{
|
||||
{ 2460120199, "Antique Cavalry Dagger"},
|
||||
@@ -341,6 +361,8 @@ namespace ReallifeGamemode.Server.Managers
|
||||
{ 1470379660 ,"Perico Pistol" },
|
||||
};
|
||||
|
||||
public static bool IsAllowedWeapon(string name) => _restrictedWeapons.Contains(name.ToLower());
|
||||
|
||||
public static bool IsValidHash(uint hash)
|
||||
{
|
||||
foreach (WeaponHash vh in Enum.GetValues(typeof(WeaponHash)))
|
||||
|
||||
Reference in New Issue
Block a user