Pistol Only Server
This limit will check for how many times a player made non-pistol kills. On the first kill, it will send a warning on chat, on the second kill, it will kick the player.
Set limit to evaluate OnKill, set action to None
Set first_check to this Expression:
Code:
! Regex.Match(kill.Weapon, @"(M1911|M9|M93R|Taurus|MP412REX|MP443|Glock)", RegexOptions.IgnoreCase).Success
Set second_check to this Code:
Code:
double count = limit.Activations(player.Name);
if (count == 1)
plugin.SendGlobalMessage(plugin.R("%p_n%, this is a pistol only server, do not use %w_n% again! Next time kick"));
else if (count > 1)
plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked you for using %w_n% on pistol only server"));
return false;
You can use this limit as a template for restricting any weapon you want. Just change the Expression in the first_check depending on what weapon you want to restrict. The way it is right now, it will activate for any Non-Pistol ... that is because of the Negation symbol "!" at the begining of the expression. If you remove, the Negation symbol "!", it becomes a positive check. So you could make it activate for certain weapons, and restrict those only, while allowing the rest.