Raised This Month: $ Target: $400
 0% 

query_client_cvar


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Bello
BANNED
Join Date: Jun 2010
Old 06-17-2010 , 20:45   query_client_cvar
#1

Hi! I have a problem with this code:

PHP Code:
#include <amxmodx>

public plugin_init()
    
register_plugin("Check lowrecoil""1.0""Bello")

public 
client_putinserver(id)
    
set_task(10.0"query_client"id__"b")

public 
client_disconnect(id)
    
remove_task(id)

public 
query_client(id) {
    
query_client_cvar(id"cl_pitchspeed""cvar_result_pitch")
    
query_client_cvar(id"cl_bob""cvar_result_pitch")
    
query_client_cvar(id"cl_bobcycle""cvar_result_pitch")
    
query_client_cvar(id"cl_bobup""cvar_result_pitch")
    
query_client_cvar(id"ex_interp""cvar_result_pitch")
    
query_client_cvar(id"cl_lw""cvar_result_pitch")
    
query_client_cvar(id"cl_lc""cvar_result_pitch")
}

public 
cvar_result_pitch(id, const cvar[], const value[]) 
{
    if ((!
strcmp(cvar"cl_pitchspeed"1)) && (str_to_num(value) != 225))
        
client_cmd(id"cl_pitchspeed 225")
 
    if ((!
strcmp(cvar"cl_bob"1)) && (str_to_num(value) != 0.01))
        
client_cmd(id"cl_bob 0.01")

    if ((!
strcmp(cvar"cl_bobcycle"1)) && (str_to_num(value) != 0.8))
        
client_cmd(id"cl_bobcycle 0.8")

    if ((!
strcmp(cvar"cl_bobup"1)) && (str_to_num(value) != 0.5))
        
client_cmd(id"cl_bobup 0.5")

    if ((!
strcmp(cvar"ex_interp"1)) && (str_to_num(value) != 0.1))
        
client_cmd(id"ex_interp 0.1")

    if ((!
strcmp(cvar"cl_lw"1)) && (str_to_num(value) != 1))
        
client_cmd(id"cl_lw 1")

    if ((!
strcmp(cvar"cl_lc"1)) && (str_to_num(value) != 1))
        
client_cmd(id"cl_lc 1")

Every 10 seconds verifies and change the cvar, i want that only do so when the player change the command, As i can do it?
Bello is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-17-2010 , 21:32   Re: query_client_cvar
#2

Hi flamin.
__________________
fysiks is offline
Bello
BANNED
Join Date: Jun 2010
Old 06-17-2010 , 21:46   Re: query_client_cvar
#3

Quote:
Originally Posted by fysiks View Post
Hi flamin.
offtopic?
Bello is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-18-2010 , 01:42   Re: query_client_cvar
#4

Quote:
Originally Posted by fysiks View Post
Hi flamin.
How do you know that?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-18-2010 , 19:31   Re: query_client_cvar
#5

Quote:
Originally Posted by drekes View Post
How do you know that?
behavior I guess. Mostly just a guess but his response seems to hint at the fact I was right.
__________________
fysiks is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-18-2010 , 21:44   Re: query_client_cvar
#6

Quote:
Originally Posted by fysiks View Post
behavior I guess. Mostly just a guess but his response seems to hint at the fact I was right.
He is actually trying to fight his case with me (and my guess is multiple other Moderators (only 1 other has Ban powers)). I'm not buying it though, but I am enjoying him trying.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-18-2010 , 19:55   Re: query_client_cvar
#7

Awesome, they should give you the banhammer to deal with this stuff.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 06-18-2010 , 20:17   Re: query_client_cvar
#8

@fysiks: That was magical how you called that, I wouldn't of noticed. Saw your post, looked at the code and it looked like something that would be needed for a ESEA type thing that flamin was trying to accomplish.
__________________
Hi.
Kreation is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-18-2010 , 20:52   Re: query_client_cvar
#9

Actually, don't give me any credit. I had help.
__________________
fysiks is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 06-18-2010 , 21:13   Re: query_client_cvar
#10

I heard.
__________________
Hi.
Kreation is offline
Closed Thread



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 14:57.


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