Raised This Month: $ Target: $400
 0% 

log condition with client query cvar


Post New Thread Reply   
 
Thread Tools Display Modes
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
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-25-2011 , 13:24   Re: log condition with client query cvar
Reply With Quote #2

PHP Code:

if(str_to_num(value) == 2000)
{
    new 
name[32];
    
get_user_name(idnamecharsmax(name));
 
    
log_amx("Client %d(%s)'s rate is ^"%s", id, name, value); 
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
avril-lavigne
Banned
Join Date: Apr 2009
Old 06-25-2011 , 14:37   Re: log condition with client query cvar
Reply With Quote #3

thank you)
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 06-25-2011 , 16:27   Re: log condition with client query cvar
Reply With Quote #4

I dont know why its not working
just dont log.
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-25-2011 , 19:31   Re: log condition with client query cvar
Reply With Quote #5

post your code
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
avril-lavigne
Banned
Join Date: Apr 2009
Old 06-26-2011 , 03:11   Re: log condition with client query cvar
Reply With Quote #6

ok i put

{
return 1


and it works.)
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
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 23:28.


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