Raised This Month: $51 Target: $400
 12% 

Get Cl Cvar


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Dav3
Senior Member
Join Date: Apr 2006
Location: Dust2
Old 08-27-2006 , 16:45   Get Cl Cvar
Reply With Quote #1

Get Client's Cvars Setting

With this plugin you can get client's cvars.

Cmd: amx_clcvar <name> <cvar>

Example: amx_clcvar D@V rate
Attached Files
File Type: sma Get Plugin or Get Source (getcvar.sma - 915 views - 961 Bytes)

Last edited by Dav3; 08-28-2006 at 11:22.
Dav3 is offline
Send a message via MSN to Dav3 Send a message via Skype™ to Dav3
Dav3
Senior Member
Join Date: Apr 2006
Location: Dust2
Old 08-27-2006 , 16:59   Re: Get Cl Cvar
Reply With Quote #2

It have a bug in longer cvars, im working on...
Dav3 is offline
Send a message via MSN to Dav3 Send a message via Skype™ to Dav3
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 08-27-2006 , 17:21   Re: Get Cl Cvar
Reply With Quote #3

lol theif
k007 is offline
Send a message via MSN to k007
ThomasNguyen
Senior Member
Join Date: May 2006
Old 08-27-2006 , 20:57   Re: Get Cl Cvar
Reply With Quote #4

This is like amx_exec.
__________________
ThomasNguyen is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-27-2006 , 21:09   Re: Get Cl Cvar
Reply With Quote #5

This isn't even written correctly (all it does is query the client's infobuffer).

Here is a completely rewritten version:

Code:
#include <amxmodx> #include <amxmisc> #if AMXX_VERSION_NUM < 160     native query_client_cvar(id, const cvar[], const resultFunc[], paramlen=0, const params[] = "") #endif public plugin_init() {     new Verstring[10]     get_amxx_verstring(Verstring,9)         if(str_to_float(Verstring) < 1.60)         return set_fail_state("Must be running AMXX 1.60 or later.")         register_plugin("Query Client Cvar","1.0","Hawk552")         register_concmd("amx_clcvar","CmdClCvar",ADMIN_KICK,"<user> <cvar> - gets cvar from client")         return PLUGIN_CONTINUE } public CmdClCvar(id,level,cid) {     if(!cmd_access(id,level,cid,3))         return PLUGIN_HANDLED             new Arg1[32],Arg2[32]     read_argv(1,Arg1,31)     read_argv(2,Arg2,31)         new Target = cmd_target(id,Arg1,1|8)     if(!Target)         return PLUGIN_HANDLED             new Params[1]     Params[0] = id     query_client_cvar(Target,Arg2,"CvarQuery",1,Params)         return PLUGIN_HANDLED } public CvarQuery(Target,const cvar[],const result[],Params[1]) {        new Name[33]     get_user_name(Target,Name,32)         client_print(Params[0],print_console,"%s's cvar %s is set to %s",Name,cvar,result) }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Dav3
Senior Member
Join Date: Apr 2006
Location: Dust2
Old 08-28-2006 , 05:48   Re: Get Cl Cvar
Reply With Quote #6

ugh...
Thief?
It's not like amx exec, because amx exec is changing the cvars, but its getting only
Hawk552 post your plugin and somebody delete this
Dav3 is offline
Send a message via MSN to Dav3 Send a message via Skype™ to Dav3
Dav3
Senior Member
Join Date: Apr 2006
Location: Dust2
Old 08-28-2006 , 06:07   Re: Get Cl Cvar
Reply With Quote #7

Your code not work in my server..
I'm typed amx_clcvar D@V rate
but didn't write anithing
Dav3 is offline
Send a message via MSN to Dav3 Send a message via Skype™ to Dav3
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-28-2006 , 10:08   Re: Get Cl Cvar
Reply With Quote #8

Quote:
Originally Posted by Dav3 View Post
Your code not work in my server..
I'm typed amx_clcvar D@V rate
but didn't write anithing
I didn't test it, it was more of a proof of concept thing. Your plugin falsely advertises that you can retrieve client's cvars with it - you can't. All it does is query the info buffer, where only a few of the clients' cvars are stored (cl_cmdrate, rate, etc.)

Also, check your "amx_plugins". If it failed, that means you're running something earlier than 1.60, and it also means that you're incapable of reading the script before putting it on your server.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Dav3
Senior Member
Join Date: Apr 2006
Location: Dust2
Old 08-28-2006 , 10:25   Re: Get Cl Cvar
Reply With Quote #9

I have 1.75a, and its running (The plugin).
Dav3 is offline
Send a message via MSN to Dav3 Send a message via Skype™ to Dav3
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-28-2006 , 10:41   Re: Get Cl Cvar
Reply With Quote #10

Quote:
Originally Posted by Dav3 View Post
I have 1.75a, and its running (The plugin).
Like I said, it was simply a proof of concept script. If you really want I'll shame you even more and go fix it.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 22:50.


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