AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do you log a cvar change into an INI? (https://forums.alliedmods.net/showthread.php?t=28797)

SweatyBanana 05-22-2006 17:32

How do you log a cvar change into an INI?
 
I need help :)

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "cvar Logger" #define VERSION "1.0" #define AUTHOR "SweatyBanana" public plugin_init()     {     register_plugin(PLUGIN, VERSION, AUTHOR). } public client_connect(id) {     if (!is_user_bot(id))         query_client_cvar(id, "mp_timelimit", "resultLog"); } public resultLog(id, const cvar[], const value[]) {     new name[32];     get_user_name(id, name, 31);         log_amx("Client %d(%s)'s rate is ^"%s^"", id, name, value); }


EDIT: I thought this would work, but I realized that it wont log who switched a cvar...it will simply check on connect what it is set to..and it doesnt log to an INI lol.

Hawk552 05-22-2006 17:44

What the fuck are you using client cvar querying for? I told you how to do it, it's not hard.

SweatyBanana 05-22-2006 17:50

No u didnt...all you said was check in the plugin_init if it had changed...That still wont tell me who changed it...

Hawk552 05-22-2006 17:52

There's no way of telling who changed it unless you take away your admin's rcon access and tell them to use amx_cvar.

SweatyBanana 05-22-2006 17:53

They are using amx_cvar...but it is not showing in my amx logs files.

Hawk552 05-22-2006 17:56

You must be using it incorrectly, because after a quick look through admincmd.sma it shows clearly that it is logged.

Make sure they're not using amx_rcon, or just rcon.

Greenberet 05-22-2006 17:56

then edit the amx_cvar function
and add a log

Twilight Suzuka 05-22-2006 18:42

It HAS a log.

SweatyBanana 05-22-2006 19:30

But it hasnt been logging.

jtp10181 05-22-2006 20:30

Quote:

Originally Posted by SweatyBanana
But it hasnt been logging.

Quote:

You must be using it incorrectly, because after a quick look through admincmd.sma it shows clearly that it is logged.

Make sure they're not using amx_rcon, or just rcon.



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

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