Page 1 of 10 123 ... LastLast
Results 1 to 10 of 97
  1. #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
    Set second_check to this Code:

    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;
    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.
    Last edited by PapaCharlie9; 22-11-2013 at 23:54. Reason: Edited for LumPenPacK's improvements

  2. #2
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    913
    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
    Second check, code

    your code
    Last edited by LumPenPacK; 19-11-2013 at 15:25.
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

  3. #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.

  4. #4
    Plugin Developer
    Join Date
    Jan 2012
    Location
    Saarland
    Posts
    913
    Quote Originally Posted by slayersghost View Post
    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.
    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;
    64 slots mixed Classic mode BF4
    32 slots rush mode BF3

  5. #5
    Heya LemPen what are the codes to add defib and repair tool to the acceptable list.

  6. #6
    Quote Originally Posted by slayersghost View Post
    Heya LemPen what are the codes to add defib and repair tool to the acceptable list.
    Just add Defib and Repair, that's good enough. Make sure you add a vertical bar | between each code.

    I edited post #1 to include LumPenPacK's improvements.
    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.

  7. #7
    Senior Member
    Join Date
    Nov 2013
    Location
    Green Spring, WV
    Posts
    109
    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.

  8. #8
    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
    And the second check code

    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;
    Is it a problem with the code? or something else? thanks

  9. #9
    Quote Originally Posted by iamrandmhero View Post
    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
    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.

  10. #10
    Quote Originally Posted by PapaCharlie9 View Post
    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?
    Yes, it is a pistols only server minus the shorty, g18 and 93r. The code is working for all weapons except the 93r.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •