You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CS2-Essentials/Features/RapidFireFix.cs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,9 @@ public HookResult OnWeaponFire(EventWeaponFire eventWeaponFire, GameEventInfo in
113
113
lastWarningTime+3>Server.CurrentTime)
114
114
returnHookResult.Continue;
115
115
116
+
if(!_plugin.Config.PrintWarnings)
117
+
returnHookResult.Continue;
118
+
116
119
// warn player
117
120
Server.PrintToChatAll($"{ChatUtils.FormatMessage(_plugin.Config.ChatPrefix)} Player {ChatColors.Red}{eventWeaponFire.Userid.PlayerName}{ChatColors.Default} tried using {ChatColors.Red}rapid fire{ChatColors.Default}!");
Server.PrintToChatAll($"{ChatUtils.FormatMessage(_plugin.Config.ChatPrefix)} Player {ChatColors.Red}{player.PlayerName}{ChatColors.Default} tried using {ChatColors.Red}{feature}{ChatColors.Default}!");
publicstaticreadonlyFakeConVar<int>hvh_restrict_awp=new("hvh_restrict_awp","Restrict awp to X per team",-1,ConVarFlags.FCVAR_REPLICATED,newRangeValidator<int>(-1,int.MaxValue));
25
26
publicstaticreadonlyFakeConVar<int>hvh_restrict_scout=new("hvh_restrict_scout","Restrict scout to X per team",-1,ConVarFlags.FCVAR_REPLICATED,newRangeValidator<int>(-1,int.MaxValue));
26
27
publicstaticreadonlyFakeConVar<int>hvh_restrict_auto=new("hvh_restrict_auto","Restrict autosniper to X per team",-1,ConVarFlags.FCVAR_REPLICATED,newRangeValidator<int>(-1,int.MaxValue));
28
+
publicstaticreadonlyFakeConVar<string>hvh_bypass_weapon_restrict_flag=new("hvh_bypass_weapon_restrict_flag","Permission flag to bypass weapon restrictions","");
27
29
28
30
publicWeaponRestrict(Pluginplugin)
29
31
{
@@ -32,93 +34,53 @@ public WeaponRestrict(Plugin plugin)
player.PrintToChat($"{ChatUtils.FormatMessage(_plugin.Config.ChatPrefix)}{ChatColors.Red}{item}{ChatColors.Default} is restricted to {ChatColors.Red}{allowedWeapons}{ChatColors.Default} per team!");
player.PrintToChat($"{ChatUtils.FormatMessage(_plugin.Config.ChatPrefix)}{ChatColors.Red}{item}{ChatColors.Default} is restricted to {ChatColors.Red}{allowedWeapons}{ChatColors.Default} per team!");
### If you use this plugin, you do NOT need [RapidFireFix](https://github.com/HvH-gg/RapidFireFix) anymore.
5
5
6
6
Our CS2 Essentials plugin is the only plugin you need to run a successful HvH server. It includes basic features like **reset score** and **rage quit** as well as optional restrictions for **weapons**, **friendly fire**, **rapid fire** and other exploit/crash fixes.
0 commit comments