CS.U-S.RO

Full Version: Restrict Commands [rc] - v2.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This plugin allows admin to restrict client commands from being used by players in their server. Using the in-game menu, you can restrict client commands for everyone server-wide and enable admin immunity if you want admin to be immuned from server-wide client command restrictions. There is also an admin console command to restrict client commands from use by players on an individual and permanent basis. Likewise, there is an admin console command to unrestrict an individual player from using a client command they have been individually restricted from using. The client commands which may be restricted are listed here in the form of <command> - <description>:
+attack - Fire
+attack2 - Weapon special function (knife stab, silencer on/off, burst fire, zoom on sniper rifles)
+reload - Reloads weapon
+use - Uses an item (get hostages, defuse bomb, press buttons, etc.)
buyequip - Brings up the buy equipment menu window
chooseteam - Brings up the window to change teams
cl_autobuy - Auto buys weapons set to auto buy
cl_setautobuy - Sets weapons to auto buy and auto buys them
coverme - Sends the "Cover Me!" radio message
drop - Drops your current weapon
enemydown - Sends the "Enemy Down!" radio message
enemyspot - Sends the "Enemy Spotted!" radio message
fallback - Sends the "Team, fall back!" radio message
followme - Sends the "Follow Me!" radio message
getinpos - Sends the "Get in position and wait for my go!" radio message
getout - Sends the "Get out of there it's gonna blow!" radio message
go - Sends the "Go! Go! Go!" radio message
holdpos - Sends the "Hold this position!" radio message
impulse 100 - Toggles flashlight on/off
impulse 201 - Spray logo
inposition - Sends the "I'm in position!" radio message
lastinv - Last used weapon (switches to your last carried item in your inventory)
needbackup - Sends the "Need Backup!" radio message
negative - Sends the "Negative" radio message
nightvision - Toggles nightvision on/off
radio1 - Brings up the "Standard Radio Messages" menu
radio2 - Brings up the "Group Radio Messages" menu
radio3 - Brings up the "Report Radio Messages" menu
regroup - Sends the "Regroup Team!" radio message
report - Sends the "Report in team!" radio message
reportingin - Sends the "Reporting In!" radio message
roger - Sends the "Roger" and "Affirmitive" radio messages
say - Chat message (mm1, public chat)
say_team - Team message (mm2, team chat only)
sectorclear - Sends the "Sector clear." radio message
sticktog - Sends the "Stick together team!" radio message
stormfront - Sends the "Team, storm the front!" radio message
takepoint - Sends the "You take the point!" radio message
takingfire - Sends the "Taking fire! Need assistance!" radio message
weapon_knife - Used to switch to the knife (note: by dropping all weapons a person automatically switches to their knife no matter what)
weapon_c4 - Used to switch to the C4 (bomb) (note: by dropping all other weapons and/or the bomb a player can then pick up the bomb from the ground in order to carry it no matter what)
By default, none of these client commands are restricted from any player to use. To restrict a command from use by every player server-wide, simply open console and type amx_rcmenu or type /rcmenu in chat. Those admin commands will bring up the Restrict Commands Configuration Menu. From there you will be able to turn restrictions ON or back OFF for any of the client commands listed above. There is also an admin immunity option on the menu which may be turned ON in order to allow admin to execute client commands which have been restricted server-wide. In addition, there is a help page you can access and view in-game which describes what each command does (exactly as listed above). To access this help page type /rchelp in console or chat.

If you wish to restrict a client command on an individual basis for only one player, type amx_rcplayer <name> <command>. To unrestrict a player from using a client command, type amx_unrcplayer <name> <command>. For these admin commands to work, the <command> must valid and in the correct format. To view valid commands in the correct format, type amx_rccommands in console (i. e. instead of typing amx_rcplayer Player +attack you must type amx_rcplayer Player attack and instead of typing amx_rcplayer Player impulse 201(or spray) you must type amx_rcplayer Player impulse201).

When using amx_rcplayer <name> <command>, players are permanently restricted by STEAM ID from use of the client command they were restricted from using in the server until an admin unrestricts them by using amx_unrcplayer <name> <command>. All information is stored in the vault. This may be used, for example, in the following way:

Installation

File Locations:
.\configs\restrictcommands.cfg
.\data\lang\restrictcommands.txt
.\data\lang\restrictcommandscfg.txt
.\plugins\restrictcommands.amxx
.\plugins\restrictcommandscfg.amxx
Modules Required
engine
nVault
Admin Commands

amx_rcplayer - <name> <command> - Restricts a player from using a client command permanently by STEAM ID
amx_unrcplayer - <name> <command> - Unrestricts a player from using a client command they have been individually restricted from using
amx_rccommands - Displays the list of valid client commands in the correct format to be used with amx_rcplayer and amx_unrcplayer
amx_rcinfo - <name> - Shows what commands a player has been restricted from using
amx_rcmenu - Brings up the Restrict Commands Configuration Menu
say /rcmenu - Brings up the Restrict Commands Configuration Menu (just type /rcmenu in chat)
say /rchelp - Shows The Command Description Help Page (just type /rchelp in chat)
/rchelp - Shows The Command Description Help Page

Plugin CVARS

Note: There are three ways of changing these CVARS
Using the in-game menu
Editing restrictcommands.cfg in the configs folder
Executing <cvar> <cvar> into the server command console (same as rcon <cvar> <cvar> but doing it this third way will not save over through a map change).
It is recommended that you use the in-game menu because it is the easiest and most user-friendly.

Default for all CVARS is 0.

restrictcommand_immunity <0>
Admin Immunity
0: Admin Immunity for server-wide client command restrictions is turned off.
1: Admin with flag a, ADMIN_IMMUNITY, do have immunity from server-wide client command restrictions and can execute client commands even if they are restricted server-wide for other players.

Where <command> is you will see the actual name of the command. The following is true for all restrictcommand_<command> CVARS.

restrictcommand_<command> <0>
Restricting the command "<command>"
0: The client command "<command>" is not restricted server-wide.
1: The client command "<command>" is restricted server-wide.

Download link: <!-- m --><a class="postlink" href="http://cs.u-s.ro/download/cs/restrictcommands.zip">http://cs.u-s.ro/download/cs/restrictcommands.zip</a><!-- m -->

[/i]