Jump to content

Command Limiter and Cooldown 1.0.7

$4.99
   (2 reviews)

1 Screenshot

  • 19k
  • 36
  • 34.67 kB
  • Update details
    v1.0.7
    Released
    Download size34.67 kB
    Total versions8
    Time between versions 1 day
    Typical update pace About every 28 days
    Freshness 684 days ago

About This File

Command Limiter

Info

Command Limiter allows you to limit the use of commands that players can use. For each command you can set the cooldown, minute, hourly, daily and wipe usage limits. 
It also allows you to apply limits in case of Building Blocks, Safe Zones, block the command permanently, etc...
Command Limiter is useful for limiting the use of commands from plugins that do not implement a blocking system or implement an inflexible blocking system.

Commands

Commands can be typed in chat (by putting the / character in front of the command), or from console.

  • /cl reset <steamID> -- This command allows you to reset usage limits for a specific player. To use this command you must have permission: commandlimiter.admin
  • /cl wipe -- This command allows reset all usage limits for all players. To use this command you must have permission: commandlimiter.admin

Commands can be added or modified in the configuration file: /oxide/config/CommandLimiter.json

Permissions

Quote

This plugin uses the permission system. To assign a permission, use oxide.grant <user or group> <name or steam id> <permission>.
To remove a permission, use oxide.revoke <user or group> <name or steam id> <permission>.

  • commandlimiter.admin -- Allows the use of commands reserved for administrators
  • commandlimiter.bypass -- Allows you to bypass the command usage limit, but only for commands that have the CanBeBypassed field set to TRUE
  • commandlimiter.bypass.force -- Allows you to easily bypass the command usage limit, regardless of the CanBeBypassed field

Default Configuration

{
  "TimeZone": "Europe/London",
  "Clear data on map wipe": true,
  "Print usage limits when command is blocked": true,
  "Chat Command": [
    "cl",
    "commandlimiter"
  ],
  "Command Setting": [
    {
      "Enabled": true,
      "Command": "cmd",
      "Commands alias": [],
      "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)": false,
      "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)": "Allow",
      "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)": "Allow",
      "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)": false,
      "CooldownSeconds (-1 infinite)": 30,
      "MaxUsagePerMinute (-1 infinite)": -1,
      "MaxUsagePerHour (-1 infinite)": -1,
      "MaxUsagePerDay (-1 infinite)": -1,
      "MaxUsagePerWipe (-1 infinite)": -1,
      "BypassPermission (Permissions to bypass the block even if [CanBeBypassed] is set to false)": []
    },
    {
      "Enabled": true,
      "Command": "cmd_2",
      "Commands alias": [
        "alias 1",
        "alias 2"
      ],
      "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)": false,
      "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)": "Allow",
      "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)": "Allow",
      "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)": false,
      "CooldownSeconds (-1 infinite)": 30,
      "MaxUsagePerMinute (-1 infinite)": -1,
      "MaxUsagePerHour (-1 infinite)": -1,
      "MaxUsagePerDay (-1 infinite)": -1,
      "MaxUsagePerWipe (-1 infinite)": -1,
      "BypassPermission (Permissions to bypass the block even if [CanBeBypassed] is set to false)": []
    }
  ],
  "VersionNumber": {
    "Major": 1,
    "Minor": 0,
    "Patch": 7
  }
}

 

  • TimeZone -- Set the time zone with which the dates will be saved: Default: Europe/London.
  • Clear data on map wipe -- Clear command usage data after a wipe. Default TRUE.
  • Print usage limits when command is blocked -- Prints the command usage limits when a player uses one of the configured commands. Default TRUE.
  • Chat Command -- Here you can add, edit or delete commands can be typed in chat (by putting the / character in front of the command), or from console.
  • Command Setting -- The list of commands on which to apply the usage and cooldown limits must be inserted here.
  • Enabled -- If set to TRUE, limits and cooldowns for this command will be enabled.
  • Command -- The command on which to apply limits and cooldowns.
  • Commands alias -- Here you can specify other commands to block with the same configurations. Useful to block a command, which has several similar or differently named commands, to do the same thing. Or alternatively to block multiple commands without creating different configurations.
  • BlockCommand -- If set to TRUE, the command cannot be used by any player, except for players with the permissions: commandlimiter.admin or commandlimiter.bypass.force.
  • SafeZone. Value [AllowOnly | Allow | Block] (Default Allow) -- Sets whether the command can be used in safe zones:
    • AllowOnly: The command can only be used in safe zones.
    • Block: The command cannot be used in safe zones.
    • Allow: No restrictions for safe zones.
  • BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow) -- Sets whether the command can be used in areas where you have building permissions:
    • AllowOnly: The command can only be used where you do not have building permissions.
    • Block: The command can only be used where you have building permissions.
    • Allow: No restrictions for building zones.
  • CanBeBypassed -- If set to TRUE the command can be bypassed by players with permission: commandlimiter.bypass.
  • CooldownSeconds  -- Cooldown for command reuse.
  • MaxUsagePerMinute -- Limit the use of the command for each minute.
  • MaxUsagePerHour -- Limit the use of the command for each hour.
  • MaxUsagePerDay -- Limit the use of the command for each day.
  • MaxUsagePerWipe -- Limit the use of the command for wipe.
  • BypassPermission (Permissions to bypass the block even if [CanBeBypassed] is set to false) -- Here you can specify one or more names, to create permissions to bypass the limit. If the player has at least 1 of these permissions, he can bypass the limit even if the CanBeBypassed property is set to false.
    Example: if you enter "vip1” as permission, a command called commandlimiter.bypass.vip1 will be created that you can assign to players.

Order Application Limits

The usage and cooldown limits of the various commands are applied in the following order:

  • Wipe limits -- If the wipe limits have not been exceeded, proceed to the next check, otherwise the command will be blocked.
  • Daily limits -- If the daily limits have not been exceeded, proceed to the next check, otherwise the command will be blocked.
  • Hourly limits -- If the time limits have not been exceeded, proceed to the next check, otherwise the command will be blocked.
  • Limits per minute -- If the minute limits have not been exceeded, proceed to the next check, otherwise the command will be blocked.
  • CooldownSeconds -- The command will be executed if the cooldown has expired, otherwise you will have to wait for the cooldown to reset.

 

LOCALIZATION

The plugin are translated into the following languages:

  • English
  • Italian

Translation files are located in the /oxide/lang folder, here is an example of a /oxide/lang/en/CommandLimiter.json translation file.

You can add translations for other languages by adding them to the folder: /oxide/lang

Edited by Scalbox


What's New in Version 1.0.7   See changelog

Released

1) Added the ability to block multiple commands in the same block configuration.
2) Added configuration to print the usage limits of blocked commands
3) Added the ability to create custom permissions to bypass the block
4) Added plugin translation into multiple languages


License

LICENSE

Digital Content Copyright License

Intellectual Property:

This digital content is protected by copyright under international and local laws. All rights are reserved and any unauthorized use is prohibited. The content purchased may not be reproduced, distributed, transmitted, or used in any form or by any means without the written permission of the copyright holder, except as required by law.

 

Terms of Use:

1. Personal Use: Your purchase of this digital content grants you a non-exclusive, non-transferable, revocable license for personal use. The content may not be shared or distributed to third parties.

2. Limitations: You may not modify, alter, adapt, create derivative works from, sell, or license this content without the written permission of the copyright holder.

3. Backup: You may make one backup copy of the content for your personal use, provided that it is not distributed.

 

Warranties and Responsibilities:

The copyright holder makes no warranties regarding the accuracy, completeness or suitability of the content for a particular purpose. In no event shall the copyright holder be liable for any damages arising from the use or inability to use the purchased digital content.

Permission Requests:

For requests for permission to use or other information, please contact:

Andrea Angelozzi - Scalbox

[email protected]


Carbon Compatible

Yes

Hide About Header

No

User Feedback

This area is for discussion and questions. Please use the support area for reporting issues or getting help.

Recommended Comments

SlayersRust

Posted (edited)

is it possible for you to add it so players cannot use a command while "Building blocked" as a config option? If so I'd buy this plugin. Then anywhere else on map Building privledge or not they may use the command with the set cooldown timer config option?

I'd like to apply this to PoliceVehicles Plugin to give players a cooldown on the Vehicle Spawn commands and block them using the command in building blocked zones this way. Dev there is unresponsive

Edited by SlayersRust
Scalbox

Posted

HI
so would you like me to add an option to block the command in case of building blocked?
Yes, it is possible, let me know if this is what you need and I will add it to the plugin
 

SlayersRust

Posted

2 hours ago, Scalbox said:

HI
so would you like me to add an option to block the command in case of building blocked?
Yes, it is possible, let me know if this is what you need and I will add it to the plugin
 

Yes I'd like blocking of using certain /commands within Building Blocked Zones

 

Scalbox

Posted

I'm adding it to the plugin, I should release it between now and tomorrow along with other new changes

  • Like 1
Scalbox

Posted

Update released

Scalbox

Posted

8 hours ago, SlayersRust said:

Yes I'd like blocking of using certain /commands within Building Blocked Zones

 

Let me know if that's OK or if you run into any problems

SlayersRust

Posted

8 hours ago, Scalbox said:

Let me know if that's OK or if you run into any problems

Can you show me an example config how to add several commands to limit?

Scalbox

Posted

30 minutes ago, SlayersRust said:

Can you show me an example config how to add several commands to limit?

{
         "Enabled":true,
         "Command":"cmd",
         "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
         "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
         "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
         "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
         "CooldownSeconds (-1 infinite)":5,
         "MaxUsagePerMinute (-1 infinite)":5,
         "MaxUsagePerHour (-1 infinite)":10,
         "MaxUsagePerDay (-1 infinite)":20,
         "MaxUsagePerWipe (-1 infinite)":100
      }


This is the basic example.
Replace Command: cmd with your command, and then apply the limits you want.
If you tell me what limit you need, I'll send you a conf for the command

SlayersRust

Posted

2 hours ago, Scalbox said:
{
         "Enabled":true,
         "Command":"cmd",
         "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
         "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
         "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
         "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
         "CooldownSeconds (-1 infinite)":5,
         "MaxUsagePerMinute (-1 infinite)":5,
         "MaxUsagePerHour (-1 infinite)":10,
         "MaxUsagePerDay (-1 infinite)":20,
         "MaxUsagePerWipe (-1 infinite)":100
      }


This is the basic example.
Replace Command: cmd with your command, and then apply the limits you want.
If you tell me what limit you need, I'll send you a conf for the command

Can you show a config with a second command? Where do I add if I want 3-4 commands for example how do I add I keep getting error configs 

Scalbox

Posted

to add multiple command:

 

{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
},
{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
},
{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
},
{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
}

 

SlayersRust

Posted (edited)

1 hour ago, Scalbox said:

to add multiple command:

 

{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
},
{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
},
{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
},
{
   "Enabled":true,
   "Command":"cmd",
   "BlockCommand (If set to TRUE players will no longer be able to use this command. Default FALSE)":false,
   "SafeZone. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "BuildingBlocked. Value [AllowOnly | Allow | Block] (Default Allow)":"Allow",
   "CanBeBypassed (If set to TRUE the command block can be bypassed. It depends on the user permissions)":false,
   "CooldownSeconds (-1 infinite)":5,
   "MaxUsagePerMinute (-1 infinite)":5,
   "MaxUsagePerHour (-1 infinite)":10,
   "MaxUsagePerDay (-1 infinite)":20,
   "MaxUsagePerWipe (-1 infinite)":100
}

 

I only typed the command once and I'm getting this error for some reason. Also using /cl wipe command with admin permission. The commands don't reset.

 

snipz.png

Edited by SlayersRust
SlayersRust

Posted

I think I fixed it, i just removed any limits of the commands, and am only gunna use the 300 second cooldown instead.

Scalbox

Posted

3 hours ago, SlayersRust said:

Penso di averlo risolto, ho appena rimosso tutti i limiti dei comandi e invece userò solo il tempo di recupero di 300 secondi.

Yes you can choose as you want, and enable the BuildingBlocked you told me and leave only cooldown. You set the rest of the limits to -1

Scalbox

Posted

Is everything else working or are you having problems?

SlayersRust

Posted

29 minutes ago, Scalbox said:

Is everything else working or are you having problems?

It all works great now! plugin is great, I'll leave a review thank you ❤️

  • Love 1
Scalbox

Posted

Hi all
I am not adding any new features to the plugin at the moment, but if you need any features that you would like to see in the plugin, please write them here in the comments.
Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.9m
Total downloads
Customers
11.9k
Customers served
Files Sold
168.6k
Total sales
Payments
3.7m
Processed total
×
×
  • Create New...

Important Information

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.