AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Catching all admin commands... (https://forums.alliedmods.net/showthread.php?t=40738)

Squallkins 07-02-2006 20:30

Catching all admin commands...
 
how would i go about catching all commands issued by an admin? e.g amx_ban,amx_slap and even rcon commands such as changelevel.

Hawk552 07-02-2006 20:44

Re: Catching all admin commands...
 
Quote:

Originally Posted by .:{EK}:. SQUALL
how would i go about catching all commands issued by an admin? e.g amx_ban,amx_slap and even rcon commands such as changelevel.

you can hook client_command, read the args, and check if the user is an admin by using get_user_flags or is_user_admin.

Xanimos 07-02-2006 22:31

Re: Catching all admin commands...
 
I'm in the middle of finishing my Ultimage Logger plugin. It will log all this and much much more. There are a couple Command Loggers out there right now including my previous one for you right now. The other one is made by JGHG.

Zenith77 07-03-2006 12:20

Re: Catching all admin commands...
 
Also on a side note:

If you return PLUGIN_HANDLED (or 0 I think) and two or more plugins have or hooked/registered the same command, then you will prevent the core from executing any other command hooks on other plugins. So long as your plugin was loaded before the plugins that have hooked the same command in plugins.ini

(I hope thats right)


All times are GMT -4. The time now is 08:01.

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