Raised This Month: $ Target: $400
 0% 

log condition with client query cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 06-25-2011 , 13:08   log condition with client query cvar
Reply With Quote #1

hi
in this example

Code:
#include <amxmodx> 

public plugin_init() 
{ 
    register_plugin("test", "1", "PM"); 
} 

public client_connect(id) 
{ 
    if (!is_user_bot(id)) 
        query_client_cvar(id, "rate", "cvar_result_func"); 
} 

public cvar_result_func(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); 
}
i need to log only players with certain value in cvar
like only if rate is 20000 . it logs all players....


public cvar_result_func(id, const cvar[], const value[])
{
new name[32];
get_user_name(id, name, 31);

if ..... rate 2000 . than log

log_amx("Client %d(%s)'s rate is ^"%s^"", id, name, value);
}
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
 


Thread Tools
Display Modes

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 23:28.


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