Raised This Month: $ Target: $400
 0% 

How do you log a cvar change into an INI?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-22-2006 , 17:32   How do you log a cvar change into an INI?
Reply With Quote #1

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.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-22-2006 , 17:44  
Reply With Quote #2

What the fuck are you using client cvar querying for? I told you how to do it, it's not hard.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-22-2006 , 17:50  
Reply With Quote #3

No u didnt...all you said was check in the plugin_init if it had changed...That still wont tell me who changed it...
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-22-2006 , 17:52  
Reply With Quote #4

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-22-2006 , 17:53  
Reply With Quote #5

They are using amx_cvar...but it is not showing in my amx logs files.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-22-2006 , 17:56  
Reply With Quote #6

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 05-22-2006 , 17:56  
Reply With Quote #7

then edit the amx_cvar function
and add a log
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 05-22-2006 , 18:42  
Reply With Quote #8

It HAS a log.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-22-2006 , 19:30  
Reply With Quote #9

But it hasnt been logging.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 05-22-2006 , 20:30  
Reply With Quote #10

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.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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