Console Command Blocker
Author
Cooltad, pRED*
About
I thought it would benefit many others if I took pRED*'s
Benchmark Exploit Blocker and build upon it (with his permission, respectively). Since I am just starting out on scripting in SM my best way of learning is by example and experience.
Installation
You can use the smx if you wish but I wouldn't recommend it as different builds of SourceMod compile and use .smx files differently.
I suggest you download the
get source version (the .sp file) and place it in 'scripting'. Then, drag the file over the
compile.exe and go into the
compiled folder and copy paste it into the
plugins folder.
Directions on adding more commands to block are inside the source file.
There are already 3 base blocks in place which are commands that can potentially crash your server.
CVARs if it is
italicized it does not need to be set by you.
sm_con_com_block_version "1.0.0"
Usage
It can be very useful as not only can it block out commands that can potentially crash your server but other commands as well.
Maybe you don't want people to be able to "suicide"? Then you would insert this example below the ones that are already there.
(this example is one of two ways to suicide; the other way is by 'explode')
Example:
PHP Code:
new flags3 = GetCommandFlags("kill"); // prevents player from suiciding using 'kill command'
SetCommandFlags("kill", flags3|FCVAR_CHEAT);
Remember to increment the number after 'flags' for each new command to block.
I beleive in making plugins that people can customize and learn from. ^_^
So I hope some of you find a use for this.
Oh and I wouldn't wanna make it so typing in the illegal commands bans the player because a simple command is never worth a ban.