Raised This Month: $ Target: $400
 0% 

query_client_cvar is blocked


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
senecas
Senior Member
Join Date: Jun 2006
Old 09-03-2009 , 20:40   Re: query_client_cvar is blocked
Reply With Quote #8

maybe you know if you see that plugin's code.

developer
cl_***speed
fps_max
cl_cmdrate

That Client's Cvars can be executed by clinet_cmd()
But query_client_cvar() function doesn't send(or recieve) Client Query.

here is simple code.

#include <amxmodx>

public plugin_init()
{
register_plugin("Query Test", "0.1", "test")
register_clcmd("test", "clcmd_test")
}

public clcmd_test(Client)
if (!is_user_bot(Client)) set_task(2.0, "CheckPlayerRates", Client)

public CheckPlayerRates(Client)
{
query_client_cvar(Client, "cl_cmdrate", "CvarResult")
}

public CvarResult(Client, const Cvar[], const Value[])
{
new fValue = str_to_num(Value)

client_print(0, print_console, "We Can Use query(Client cl_cmdrate= %d", fValue)
return PLUGIN_HANDLED;
}

If you can see "We Can Use Query" Message, It works. but....not

Last edited by senecas; 09-03-2009 at 20:50.
senecas is offline
 



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 15:11.


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