Raised This Month: $12 Target: $400
 3% 

Command Limiter


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Exolent[jNr] (178)
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 10-19-2008 , 18:24   Command Limiter
Reply With Quote #1

Admin Command Limiter

Requirements
: AMXX 1.8.

Description: This plugin allows server owners to limit how much times other admins/players can use certain commands, during a round or in a chosen time frame. You can configure different restriction for different access levels. levels. Requested by crazyeffect on this thread.

Files: addons\amxmodx\configs\command_limit.txt

Configuration: Explained in the file, that will be automatically created on first plugin run.

Commands:

cmd_limit_reload: reloads the configuration file


Obs: The command counter will only be reset on round end on Counter-Strike, since I could not find the round end events for the other mods. The timed reset works normally on all mods.

IMPORTANT: This plugin MUST be the first in plugins.ini, otherwise it won't be able to capture other plugins' commands.

Changelog:
Code:
1.0 - 10/19/2008 - Initial Release
1.1 - 10/25/2008 - Fixed bug in command detection, added reload command, minor improvements
Attached Files
File Type: sma Get Plugin or Get Source (command_limit.sma - 2485 views - 5.1 KB)

Last edited by danielkza; 10-25-2008 at 18:37.
danielkza is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 10-19-2008 , 18:52   Re: Command Limiter
Reply With Quote #2

wow i have to test this, i cant in this moment but, when i back i will test it..

gj, is a good idea of crazyeffect
Alucard^ is offline
Send a message via Skype™ to Alucard^
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 10-20-2008 , 11:05   Re: Command Limiter
Reply With Quote #3

Thanks
__________________

Last edited by YamiKaitou; 10-20-2008 at 11:09. Reason: no asking for karma
crazyeffect is offline
Send a message via MSN to crazyeffect
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-20-2008 , 11:13   Re: Command Limiter
Reply With Quote #4

Quote:
Originally Posted by danielkza View Post
Obs: The command counter will only be reset on round end on Counter-Strike, since I could not find the round end events for the other mods. The timed reset works normally on all mods.
You could reset on new round:
http://forums.alliedmods.net/showthread.php?t=42159
Code:
public plugin_init() {     register_event("HLTV", "EventNewRound", "a", "1=0", "2=0"); } public EventNewRound() {     // reset }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 10-20-2008 , 11:18   Re: Command Limiter
Reply With Quote #5

Hmmm... I tryed the plugin at my server... And i followed your commands... But it doesnt create map called "command_limit.txt" in your configs map

And i also would add some commands like "cl_active 0-1" and "amx_addlimit "amx_revive" 5" or something Then would the plugin be great
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-20-2008 , 11:21   Re: Command Limiter
Reply With Quote #6

Also, some commands cannot be detected with register_clcmd().
You should use client_command() instead.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-20-2008 , 12:17   Re: Command Limiter
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
You could reset on new round:
This event is cstrike only.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 10-20-2008 , 14:31   Re: Command Limiter
Reply With Quote #8

Nice plugin , was thinking to make somthing like this myself but I would not do it any better . Gj
__________________
I am out of order!
grimvh2 is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 10-25-2008 , 11:14   Re: Command Limiter
Reply With Quote #9

Can you make me an example:
Example = Admin can only use once amx_revive each 5 minutes (300 seconds)

...
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 10-25-2008 , 13:40   Re: Command Limiter
Reply With Quote #10

Quote:
Originally Posted by crazyeffect View Post
Can you make me an example:
Example = Admin can only use once amx_revive each 5 minutes (300 seconds)

...
Put this on the text file:
Code:
amx_revive cl 1 300 *
__________________

Community / No support through PM
danielkza is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode