AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Commands Blocker v0.1.1 (https://forums.alliedmods.net/showthread.php?t=120198)

fezh 03-01-2010 17:51

Commands Blocker v0.1.1
 
3 Attachment(s)
.: 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 :.

Exolent[jNr] 03-01-2010 18:03

Re: Commands Blocker v0.1.0
 
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.

fezh 03-01-2010 18:10

Re: Commands Blocker v0.1.0
 
Will try everything. And about the variables I copied them from my 1HP-related plugin.

Cader 03-01-2010 21:00

Re: Commands Blocker v0.1.0
 
What kind of 'commands' does this plugin block? Could you please make it clear a little bit?..

Exolent[jNr] 03-01-2010 22:10

Re: Commands Blocker v0.1.0
 
Quote:

Originally Posted by Cader (Post 1104930)
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.

tuty 03-02-2010 02:33

Re: Commands Blocker v0.1.0
 
PHP Code:

new szConfigsDir64 ];
    
get_localinfo"amxx_configsdir"szConfigsDircharsmaxszConfigsDir ) ); 



You could use :arrow: get_configsdir()

AntiBots 03-02-2010 06:17

Re: Commands Blocker v0.1.0
 
Quote:

Originally Posted by tuty (Post 1105109)
PHP Code:

new szConfigsDir64 ];
    
get_localinfo"amxx_configsdir"szConfigsDircharsmaxszConfigsDir ) ); 

You could use :arrow: get_configsdir()

No, because that is in amxmisc.h and is the same. More memory in params.

xPaw 03-02-2010 06:28

Re: Commands Blocker v0.1.0
 
Quote:

Originally Posted by AntiBots (Post 1105191)
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 :D

fezh 03-02-2010 10:40

Re: Commands Blocker v0.1.1
 
Updated.

Hawk552 04-02-2010 18:51

Re: Commands Blocker v0.1.1
 
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.


All times are GMT -4. The time now is 07:32.

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