Jump to content

Simple Weapon Limiter v1.0.0.0


ImportBot

Recommended Posts

Originally Posted by s1ngular1ty*:

 

Description


This plugin is currently for BF4 ONLY !!!!

 

This plugin was originally created to enforce weapon limits in a knife and pistol only server. I quickly realized it could be used to limit any weapon on any type of server.

 

Unfortunately, because of the way Battlefield 4 reports vehicle kill information, vehicles can not be limited using this plugin.

 

This plugin limits players from using certain weapons, or categories of weapons, in game. Action is taken against players when they kill with a weapon or weapon category you have restricted with this plugin. An escalating punishment system is built into the plugin. The punishments grow more severe until the player is temporarily banned for a time duration you can adjust. The punishment system is as follows:

 

 

Punishment Pattern:

 

  • Warning 1 - The offender is killed and warned that they used a restricted weapon via a admin yell directed to them and in game chat. The victim is also notified that the killer was punished to prevent victim rage.

  • Warning 2 - The offender is warned again like they were warned in warning 1 and the victim is also notified.

  • Kick - The offender is kicked and notified in the kick message why they were kicked. Everyone in game is notified that the offender is kicked.

  • Temporary Ban - If the offender returns to the game and uses a restricted weapon again during the same game, they are temporarily banned from the server for a duration of your choosing. The ban duration can be set with the Temp Ban Duration setting in the plugin. The time you specify for the ban is in minutes.

By default, this plugin restricts all weapons except those that you specifically allow. This makes it very easy to set up restrictions for a knife and pistol only server. The default configuration of the plugin is setup to allow only Melee weapons (knives), pistols, and the phantom bow (weapon code dlSHTR).

 

You can change this behavior if you wish with the Restriction Mode setting.

 

 

Settings


 

  • Enable White List? - This setting controls the player white list for the plugin. If set this setting is true then the player white list is activated. Any players in the player white list will be protected from punishments for using restricted weapons. If this setting is set to false then the white list is deactivated.

  • White List Admins? - This setting controls whether admins are immune to the weapon restrictions of the plugin. Setting this to true means admins are protected from punishments if they use a restricted weapon. Setting this to false means admins are restricted like all other players.

  • White List - This setting is a list of players you want to protect from being punished if they used a restricted weapon. Place one player name per line in the setting as shown below:

S1ngular1ty

Phogue

RandonDude

  • Restriction Mode - This setting controls the how the plugin restricts weapons. There are two options. The first mode called WhiteList is the default behavior of the plugin. This mode restricts all weapons except those you explicitly allow. The second mode is called BlackList and it exhibits the opposite behavior. It allows all weapons except those that you explicitly restrict.

  • Allowed Weapon Categories - This setting is only available in the WhiteList restriction mode. Enter the weapon categories you wish to allow in this setting. You must enter one category per line as shown:

Melee

Handgun

Impact

The allowable weapon categories are available in the BF4.def file in the \Configs folder of your Procon installation. I've also listed them below in the Weapon Categories section of this post.

  • Disallowed Weapon Categories - This setting is only available in the BlackList restriction mode. Enter the weapon categories you wish to restrict in this setting. You must enter one category per line as shown:

SniperRifle

ProjectileExplosive

Shotgun

The allowable weapon categories are available in the BF4.def file in the \Configs folder of your Procon installation. I've also listed them below in the Weapon Categories section of this post.

 

  • Allowed Weapons - In the WhiteList restriction mode, this setting allows you to specify individual weapons that you whish to allow from weapon categories that are not allowed in the Allowed Weapon Categories setting or that don't have a weapon category. For example, if you want to allow the Phantom Bow you must place the weapon code dlSHTR in this setting because the Phantom Bow does not have a weapon category.

In the BlackList restriction mode, this setting allows you to specify individual weapons that you wish to allow from weapon categories that you restricted in the Disallowed Weapon Categories setting. For example, if you wanted to limit sniper rifles to a few choices you could restrict the SniperRifle category and then allow the specific weapon codes for the rifles you want to allow by placing them in this setting.

This setting requires you to enter 1 weapon per line as shown:

dlSHTR

U_BallisticShield

The allowable weapon codes are available in the BF4.def file in the \Configs folder of your Procon installation

 

  • Disallowed Weapons - In the WhiteList restriction mode, this setting allows you to specify individual weapons that you wish to restrict from weapon categories that are allowed in the Allowed Weapon Categories setting or that don't have a weapon category. A very common example of the usefulness of this setting would be to allow all handguns using the Handgun category in Allowed Weapon Categories while limiting the use of the G18 and M93 automatic pistols by by placing their weapon codes in this setting.

In the BlackList restriction mode, this setting allows you to specify individual weapons that you wish to restrict from weapon categories that you have NOT restricted in the Disallowed Weapon Categories setting. For example, if you wish to restrict 1 sniper rifle out of all the sniper rifles you would enter the weapon code for that rifle in this setting.

This setting requires you to enter 1 weapon per line as shown:

U_Glock18

U_M93R

U_SerbuShorty

The allowable weapon categories are available in the BF4.def file in the \Configs folder of your Procon installation

 

  • Temp Ban Duration (minutes) - This setting controls the temporary ban duration for players that repeatedly violate the restricted weapons rules during a game. The time shown is in minutes.

 

Weapon Categories


These are the available weapon categories from the BF4.def file in the \Configs folder of your Procon installation.

AssaultRifle

Carbine

DMR

Explosive

Handgun

Impact

LMG

Melee

Nonlethal

PDW

ProjectileExplosive

Shotgun

SMG

SniperRifle

Commands


 

  • !checkaccount [playername]

- Checks whether the player specified is an admin and sends message to you in chat

 

  • !decrpunish [playername]

- Decreases the punishment level of a player by 1

 

  • !incrpunish [playername]

- Increases the punishment level of a player by 1

 

  • !checkpunish [playername]

- Checks the current punishment level of a player

 

  • !setpunish [playername] [value]

- Sets the punishment level of a player to the value you specify. Value can be between 0 and 2

 

  • !clearpunish [playername]

- Clears the punishments for the player you specify

Command Response Scopes


 

  • ! - Responses will be displayed to everyone in the server.

  • @ - Responses will only be displayed to the account holder that issued the command.

All error messages are privately sent to the command issuer

 

 

Development


Changelog

 

 

  • V1.0.0.0 - Initial Release

 

Credits


A special thanks to the authors of InsaneLimits. I've borrowed some of their code for this plugin in a few places.

 

 

Installation

 


Copy the WeaponLimiter.cs file in the attached ZIP file into the \Plugins\BF4 folder of your Procon installation

 

Attached Files:

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Proteas*:

 

s1ngular1ty plugin tested and added to server, works fine, the setup was very easy and I wanted to thank you for making my day :smile:

 

There some things you can write to give more options to this awesome plugin.

 

Punishment Pattern 1,2,kick & tempban give the server admin the option to add his pattern

ex: 1 Warning 2,3 Punishment 4 Temban 5 Ban.

Server messages give the admin the option to send a yell,chat message or both also give

him the right to write whatever he want in punish message for the offender and the victim.

Debug level is 1 by default is 0 to 1 is 0 to 5 ? because didnt see anything in details.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Yeah believe max is like 5. You can turn it up to see the kill messages and weapon codes. So you can find a weapon code by killing someone with it if you have the debug setting turned up. If you turn it up to 4 you will see weapon codes when someone kills. Debug level 1 shows kill messages with weapon name and weapon category but not weapon code.

 

I'll think about adding the features you wanted. I wanted to keep it simple. It is a fair amount of work to add those features.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Hello.

Plugin tested and added to server, works fine, but Like many other scripts - it is impossible to prohibit EOD bot.

 

Thank you for you work.

Yep, it is because EOD bot shows up as DEATH like most vehicle kills. So you can't really limit it on kill.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by EBassie*:

 

Hello.

Plugin tested and added to server, works fine, but Like many other scripts - it is impossible to prohibit EOD bot.

 

Thank you for you work.

You can prohibit the use of the EOD Bot with the "Loadout Enforcer" Plugin:

myrcon.net/.../on-spawn-loadout-enforcer-for-infantryvehicles-adkatslrt

 

This plugin is not free though.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Hello, heres a problem im having. Its whitelisting admins even though its setting is "false"

I can't duplicate your problem. I typed in everything exactly as you have it. Not sure why you are having issues.

 

 

I do notice you aren't typing in codes correctly. They have to match the codes in the BF4.def file exactly. If there is "U_" in front you must have it.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

I can't duplicate your problem. I typed in everything exactly as you have it. Not sure why you are having issues.

 

 

I do notice you aren't typing in codes correctly. They have to match the codes in the BF4.def file exactly. If there is "U_" in front you must have it.

Those codes i got from IL limit. They all work fine in the limit (and in your plugin also). Just dont know why the "admin exclution" happens when the option is set to false.

 

Ive also noticed, Sometimes players gets directly banned for 60 minutes for using Claymore without having any warning at first. Unfortunitely i dont have a log of it happening at that time.

 

Another thing, ive read USAS-12 cant be disallowed because it says "Death" when you kill with it. Although, thats not true. I tested USAS-12 in IL and it certainly punishes when i kill someone with it.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Those codes i got from IL limit. They all work fine in the limit (and in your plugin also). Just dont know why the "admin exclution" happens when the option is set to false.

 

Ive also noticed, Sometimes players gets directly banned for 60 minutes for using Claymore without having any warning at first. Unfortunitely i dont have a log of it happening at that time.

 

Another thing, ive read USAS-12 cant be disallowed because it says "Death" when you kill with it. Although, thats not true. I tested USAS-12 in IL and it certainly punishes when i kill someone with it.

I wrote this plugin. You must type the codes exactly as they appear in the BF4.def file if you want it to work. Trust me.

 

Also, it is impossible for someone to be insta banned for using a weapon. If you have any logs of this please post, but I highly doubt this is happening.

 

USAS-12 may sometimes say death and sometimes may have the correct code. BF4 is not exactly repeatable for some of these things. Again, post logs. I can't verify anything if you don't post logs. Set the debug to 4 if you are recording logs, then I can see the kill codes for the weapons that BF4 is sending.

 

EDIT

 

I just tested the USAS-12 and it registered as a shotgun and the guy was killed for using it. So again, not sure what your problem is.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

I wrote this plugin. You must type the codes exactly as they appear in the BF4.def file if you want it to work. Trust me.

 

Also, it is impossible for someone to be insta banned for using a weapon. If you have any logs of this please post, but I highly doubt this is happening.

 

USAS-12 may sometimes say death and sometimes may have the correct code. BF4 is not exactly repeatable for some of these things. Again, post logs. I can't verify anything if you don't post logs. Set the debug to 4 if you are recording logs, then I can see the kill codes for the weapons that BF4 is sending.

Well, all i know is those codes works fine in IL and also in your plugin. But maybe because "Disallowed Weapon Categories" covers them all as a backup? i dont know, probably.

 

I will save ban log next time it happens. I might be wrong about it too. Maybe i missed a warning log entry.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Well, all i know is those codes works fine in IL and also in your plugin. But maybe because "Disallowed Weapon Categories" covers them all as a backup? i dont know, probably.

 

I will save ban log next time it happens. I might be wrong about it too. Maybe i missed a warning log entry.

This plugin is not insane limits. Do what I'm telling you if you want it to work. Copy and paste weapon codes from the BF4.def file and I promise it will work.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by BuRockK*:

 

This plugin is not insane limits. Do what I'm telling you if you want it to work. Copy and paste from the BF4.def file and I promise it will work.

Okay i will change the weapon codes to the ones from BF4.def file.

 

I hope sometime in the future we can set how many warnings player gets before kick or ban and have banning or kicking options like duration, msg, ban type etc.

 

Its nice to have a plugin to restrict specified weapons while allowing specified weapons and vice versa

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Okay i will change the weapon codes to the ones from BF4.def file.

 

I hope sometime in the future we can set how many warnings player gets before kick or ban and have banning or kicking options like duration, msg, ban type etc.

 

Its nice to have a plugin to restrict specified weapons while allowing specified weapons and vice versa

I'm working on those features but they won't be done for a while.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by LjMjollnir*:

 

Heyya s1ngular1ty

 

Been a very long time since ive looked around here.. but your plugin does pretty much what my old plugin did :ohmy:.. tho mine has alot more features (map selection, each individual weapon select able in the gui n much more.. i cant remember it all been a couple of years)..

 

anywayz i doubt this old thing works anymore (been a couple of years).. but it did the gui quite nice and you may be able to rip pieces of the code out for use

as i said it may not work, probably doesnt.. i havent added anything to it in years and it did have an issue when loading up for the first time.. you need to shutdown and restart the procon server a couple of times as it makes its files. but as the BF4.def gets updated most of the weapons will be handled correctly (unless that format has changed) its just maps it wont understand because i was adding those manually (so i could make short names n such).

 

http://s000.tinyupload.com/index.php...49393506225790

 

anywayz thats the link.. you are welcome to use anything in there.. good luck n have fun

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

More features is not necessarily a good thing. That is why this is called simple weapon limiter.

 

But thanks, I'll look through your code and see if I can use any of it.

* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Originally Posted by Chilace*:

 

Unfortunately, because of the way Battlefield 4 reports vehicle kill information, vehicles can not be limited using this plugin.

Can you improve your plugin to limit vehicles the way like Insane Limits:

Regex.Match(kill.Category, @"(VehicleAir)").Success

Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success

 

showthread....aponName-usage*

myrcon.net/.../insane-limits-mobile-anti-air-and-aa-mine-limit

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by s1ngular1ty*:

 

Can you improve your plugin to limit vehicles the way like Insane Limits:

Regex.Match(kill.Category, @"(VehicleAir)").Success

Regex.Match(kill.Weapon, @"(LAV_AD|Tunguska|PGZ-95)").Success

 

showthread....aponName-usage*

myrcon.net/.../insane-limits-mobile-anti-air-and-aa-mine-limit

I can add it but the problem with BF4 is the kill information for vehicles is often missing. So it won't work all the time. I tested this when I was writing the plugin.

 

Many times vehicle kills are reported only as "Death". It happens a lot. So it would look like my plugin is buggy when it is the game itself.

 

 

I even double checked today to confirm my previous findings. BF4 is too inconsistent with how it reports vehicle kills for me to add this into my plugin. I know other plugins allow you to try and limit vehicles but I bet you will notice they aren't reliable either. They are seeing the same information I can see in my plugin and sometimes it doesn't contain any information on the vehicle that killed the player and says "Death" killed the player.

 

So I won't be adding this. Sorry.....DICE needs to fix this bug in the game. Hopefully BF1 will be better.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Chilace*:

 

So I won't be adding this. Sorry.....DICE needs to fix this bug in the game. Hopefully BF1 will be better.

Thank you for your reply and for your work. Hopefully, BF1 will be managed by the procon.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by ColColonCleaner*:

 

Hey bro, what is the plugin to not allow people to spawn in with shotguns and it tells them not to use shotguns?

You have the correct plugin already, just need to get the configuration straight.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.