This logs all commands done by admins.
Stored in .log file(s) or SQL depending on how you have the cvars/.sma set up.
Required Modules:
<dbi> if using SQL
This is an important update if you were using files instead of SQL.
Code:
/* * * * * * * * * * * * * * *
* Amx Mod X Script
* Command Logging.
*
* Plugin is used to Log all admin commands.
*
*******************************************
* Created by: $uicid3 V1.4
*
* V1.0 - First creation.
* V1.1 - Added DB support.(never released)
* V1.2 - Added clcmd support.
* - Made SQL more advanced
* - Added example php files.
* - Added blockcmdlist.ini
* - Added Time to logs
* V1.3 - Change code for less db calls.
* - Changed blockcmdlist.ini to log_cmdlist.ini
* - Added cvar: amx_cmd_list.
* - Cleaned up code again. Changed so plugin makes less db calls.
* - No longer Logs commands twice.
* V1.4 - <font color="red">Fixed Bug in File Log with Steam ID.</font>
*
* This file is provided as is (no warranties).
*
* This file is free software you can redistribute this as
* you please.
*
********************************************
* Credits:
* Idea/Concept : Everyone on the Forums who has asked for this.
*
******************************************
* Cvar: amx_cmd_list
* Sets how to use the log_cmdlist.ini file
* 0 - Dont use file. (Log all cmds)
* 1 - Use as a Block list. (Dont use commands listed in file)
* 2 - Use as an Allow list. (Only use commands listed in file)
*
* Default is 1
******** If Not using DataBases ******
* Everything gets logged into folder amxmodx/logs/Cmds/
*
* Logged according to cvar: amx_cmd_log_file
* 0 - One big file
* 1 - By Admin Name
* 2 - By Admin AuthID
* 3 - By Date
* 4 - By Map
*
* Default is 2
********************************************
* In File Logging according to cvar: amx_cmd_logging
* Cvar Value - Example Line:
* ---------------------------
* 0 - ADMIN [Time of Day] 'Name here' used 'cmd_here all "args here"'
* 1 - ADMIN [Time of Day] 'Name here'<STEAM_ID_HERE> used 'cmd_here all "args here"'
* 2 - ADMIN [Time of Day] 'Name here' used Cmd 'cmd_here' with args 'all "args here"'
* 3 - ADMIN [Time of Day] 'Name here'<STEAM_ID_HERE> used Cmd 'cmd_here' with args 'all "args here"'
*
* Default is 3
***** If using DataBases ********
* Just load plugin and change map. Everything will be done for you.
*
* Sql variables read out of amxmodx/configs/sql.cfg
*
* If any errors occur while using SQL it stops logging so you dont get the error for every command used. ;p
********************************************/
//Uncomment to use SQL
//#define SQL_MODE
You NEED to have the directory amxmodx/logs/
Cmds/ if not the plugin wont log the command and the commands dont work.
You need to have a log_cmdlist.ini. I Highly recommend using it. Which ever way you want as long as its there.
Please Note: A new cvar has been added. With regards to log_cmdlist.ini
I have included example PHP read-out pages. Feel free to use them or just use as a reference to make your own.
There is more information in the ReadMe files in the zip.