Raised This Month: $32 Target: $400
 8% 

Commands Blocker v0.1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   Hawk552 (427)
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-01-2010 , 17:51   Commands Blocker v0.1.1
Reply With Quote #1

.: Description :.
I know there was another plugin that does something like this, but this plugin is different because it's a generic command blocker, adding a customization file to add every command you want to be blocked. Also I've uploaded a commands dump that will log every command you use, for testing purposes only.
Note that there are commands that cannot be blocked using this plugin, such as: retry, +jump, +duck, ect. They need to be hooked separately.
Also remember if you want to use those plugins in Counter-Strike you would need to enable it's functionalities, so you will need to uncomment this line in both plugins:
PHP Code:
//#define USING_CSTRIKE 
.: Changelog :.
Code:
- Version: 0.1.1 (March 2, 2010)
* Added full Counter-Strike support.

- Version: 0.1.0 (March 1, 2010)
* First public release.
.: Download :.
Attached Files
File Type: ini commands_blocker.ini (51 Bytes, 2833 views)
File Type: sma Get Plugin or Get Source (commands_blocker.sma - 4393 views - 1.5 KB)
File Type: sma Get Plugin or Get Source (commands_blocker_dump.sma - 2855 views - 645 Bytes)
__________________
"There is no knowledge, that is not power"

Last edited by fezh; 04-02-2010 at 18:56.
fezh is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-01-2010 , 18:03   Re: Commands Blocker v0.1.0
Reply With Quote #2

Questions:

g_szMessages
g_iMessagesCount

I thought they were commands.
I guess you just copied from another plugin.

Ideas:

1. Use register_clcmd( ) in the ReadFileData( ) and remove the arrays so there can be unlimited.

2. Use a Trie and load all commands (make them lowercase) into there.
Hook client_command( ) (and CS_InternalCommand( ) if CS is being used) and check if command (in lowercase) was issued.
That way it allows infinite, and also supports case-insensitivity as well as hooking some commands in CS that client_command( ) can't hook.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-01-2010 , 18:10   Re: Commands Blocker v0.1.0
Reply With Quote #3

Will try everything. And about the variables I copied them from my 1HP-related plugin.
__________________
"There is no knowledge, that is not power"
fezh is offline
Cader
Senior Member
Join Date: Mar 2007
Old 03-01-2010 , 21:00   Re: Commands Blocker v0.1.0
Reply With Quote #4

What kind of 'commands' does this plugin block? Could you please make it clear a little bit?..
Cader is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-01-2010 , 22:10   Re: Commands Blocker v0.1.0
Reply With Quote #5

Quote:
Originally Posted by Cader View Post
What kind of 'commands' does this plugin block? Could you please make it clear a little bit?..
Any command possible to be hooked.
stopsound, buy, impulse, etc.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-02-2010 , 02:33   Re: Commands Blocker v0.1.0
Reply With Quote #6

PHP Code:
new szConfigsDir64 ];
    
get_localinfo"amxx_configsdir"szConfigsDircharsmaxszConfigsDir ) ); 


You could use get_configsdir()
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-02-2010 , 06:17   Re: Commands Blocker v0.1.0
Reply With Quote #7

Quote:
Originally Posted by tuty View Post
PHP Code:
new szConfigsDir64 ];
    
get_localinfo"amxx_configsdir"szConfigsDircharsmaxszConfigsDir ) ); 
You could use get_configsdir()
No, because that is in amxmisc.h and is the same. More memory in params.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-02-2010 , 06:28   Re: Commands Blocker v0.1.0
Reply With Quote #8

Quote:
Originally Posted by AntiBots View Post
No, because that is in amxmisc.h and is the same. More memory in params.
Lies, it is a stock in amxmisc.inc
Well i hope you meant .inc not .h
__________________
xPaw is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-02-2010 , 10:40   Re: Commands Blocker v0.1.1
Reply With Quote #9

Updated.
__________________
"There is no knowledge, that is not power"
fezh is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-02-2010 , 18:51   Re: Commands Blocker v0.1.1
Reply With Quote #10

This plugin is well done.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 06:31.


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