Results 1 to 10 of 104
-
16-11-2013, 15:40 #1
insane limits knife and pistols only
Hi.
Im looking to turn our server to a knife and pistol only server for the weekends.can you help please...
Edit....Would this work:
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, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_Glock18|U_M1911|U_M9|U_M93R|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Suicide|SoldierCollision|DamageArea|Death)", RegexOptions.IgnoreCase).Success
Code:double count = limit.Activations(player.Name); if (count == 1) { plugin.KillPlayer(player.Name); plugin.SendPlayerMessage(player.Name, plugin.R ("%p_n%, this is a pistol only server, do not use %w_n% again! Next time kick")); } else if (count == 2) { plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked you for using %w_n% on pistol only server")); plugin.PRoConChat(plugin.R("%p_n% has been kicked for sniping on rush.")); } return false;
Last edited by PapaCharlie9; 23-11-2013 at 00:54. Reason: Edited for LumPenPacK's improvements
-
16-11-2013, 17:55 #2
These are all pistols:
U_Taurus44
U_HK45C
U_CZ75
U_FN57
U_Glock18
U_M1911
U_M9
U_M93R
U_MP412Rex
U_MP443
U_P226
U_QSZ92
You need to add the "melee" kill because you said the knife is also allowed.
Also "suicide", "death", "SoldierCollision", "DamageArea" could be problem. I don't think you want to punish these kills.
On kill
First check, expression
Code:!Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_Glock18|U_M1911|U_M9|U_M93R|U_MP412Rex|U_MP443|U_P226|U_QSZ92|Melee|Suicide|SoldierCollision|DamageArea|Death)", RegexOptions.IgnoreCase).Success
your code
-
19-11-2013, 15:41 #3
had to make a change to the first check:expression the U_QSZ92 had a 1 at the end.Besides that works great.Also I would like for the plugin to "kill" those who dont use pistols or knives with a warning.instead of just a warning.
-
19-11-2013, 16:24 #4
Sorry, that "1" was a typo.
If you want to kill players and send a message to those players you could use this code for second check.
Code:double count = limit.Activations(player.Name); if (count == 1) { plugin.KillPlayer(player.Name); plugin.SendPlayerMessage(player.Name, plugin.R ("%p_n%, this is a pistol only server, do not use %w_n% again! Next time kick")); } else if (count == 2) { plugin.KickPlayerWithMessage(player.Name, plugin.R("%p_n%, kicked you for using %w_n% on pistol only server")); plugin.PRoConChat(plugin.R("%p_n% has been kicked for sniping on rush.")); } return false;
-
22-11-2013, 22:55 #5
Heya LemPen what are the codes to add defib and repair tool to the acceptable list.
-
23-11-2013, 00:54 #6Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.
-
23-11-2013, 22:56 #7
If you are only doing it for the weekends you should setup a check on date and time so when its friday 12:00:01am it will activate the plugin. Then when its sunday 12:00:01am it deactivates it. Not sure if this can be done but hell why not if its only for the weekends. Then you wont have to enable it and it will do it on its own.
-
24-11-2013, 00:51 #8
- Join Date
- Nov 2013
- Posts
- 2
Hi guys, looking for help with banning the use of the 93r. I have removed it from the expression but still allows players to use it. this is my expression
Code:!Regex.Match(kill.Weapon, @"(U_Taurus44|U_HK45C|U_CZ75|U_FN57|U_M1911|U_M9|U_MP412Rex|U_MP443|U_P226|U_QSZ92|U_Defib|Melee|Suicide|SoldierCollision|DamageArea|Death)", RegexOptions.IgnoreCase).Success
Code:double count = limit.Activations(player.Name); if (count == 1) plugin.SendGlobalMessage(plugin.R("%p_n%, This weapon is forbidden, 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% please read the rules")); return false;
-
24-11-2013, 16:34 #9
Do you mean you have a pistols-only server but you don't want to allow 93r? That's the code you have, it should work fine. Make sure you have Enabled the limit and you don't have virtual_mode at the top of the settings set to True.
Or do you mean you want to ban 93r from all use on your server, which is not a pistols-only server?Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.
-
24-11-2013, 19:17 #10
- Join Date
- Nov 2013
- Posts
- 2