Raised This Month: $ Target: $400
 0% 

Trouble on Getting a Client Cvar?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
musaulker
Junior Member
Join Date: Oct 2007
Old 10-15-2007 , 14:46   Trouble on Getting a Client Cvar?
Reply With Quote #1

Hello,

I try to write a simple plugin reading a cvar from the client but i get errors and i cannot read the value Whats the problem? (I also tried client_putinserver and also client_authorized but same problem..)
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>


#define PLUGIN "TestingCvarPlugin"
#define VERSION "1.0"
#define AUTHOR "test"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
}

public 
client_connect(id)
{
    
client_cmd(id"say %s""testing cvar reading from client");
    
query_client_cvar(id"zoom_sensitivity_ratio""get_zoom_result_func");
}

public 
get_zoom_result_func(id, const cvar[], const value[])
{
    new 
name[32];
    
get_user_name(idname31);
    
    
log_amx("Client %d(%s)'s zoom_sensitivity_ratio is ^"%s^""idnamevalue);

and the error message on the console is:
PHP Code:
Host_ErrorUserMsgNot Present on Client 58

Can
't "say", not connect 
I understand the second message; if i cannot connect, i cannot send a command like "say" but what does thie means? "Host_Error: UserMsg: Not Present on Client 58" and how can i solve this problem?

Thanks..
musaulker 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 01:22.


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