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

get_user_info()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
capndurk
Senior Member
Join Date: Feb 2006
Old 03-18-2006 , 01:27   get_user_info()
Reply With Quote #1

I'm playing around with client information, and if anyone has ANY information, AT ALL, regarding set_user_info() or get_user_info(), it would be greatly appreciated.

My main question, though, is this:

Does anyone have a list of information variables that can be retrieved from a client (cl_updaterate, etc.)?

I'm asking this because it seems that the funcwiki isn't completely accurate in explaining this command:

Quote:
Originally Posted by funcwiki
get_user_info(index,"cl_updaterate",MyString, 8)
get_user_info(index,"rate",MyString,8)
get_user_info(index,"name",MyString,8)
get_user_info(index,"model",MyString,8)
get_user_info(index,"_vgui_menus",MyString,8) ;
get_user_info(index,"team",MyString,8);
It seems as though cl_updaterate, rate, name, and model are the only ones that get_user_info will retrieve.

I don't believe the most important commands (such as ex_interp and the cl_bob commands) are able to be retrieved through this function, and I was hoping someone could either A) prove me wrong, or B) tell me a way in which this information could be printed to a player's console (or used in code).
capndurk is offline
ZeonSoldier
Member
Join Date: Jan 2006
Old 03-18-2006 , 01:33  
Reply With Quote #2

You can try typing 'cvarlist' in console... That should give you all clientside variables... minus the sv_ and mp_ ones... those would be for hosting a server...

Beyond that, I know the 'team' variable is not the way to find their team. Looking at the documentation... BillyTheKid submitted:
Quote:
Originally Posted by BillyTheKid
djschwartz at adelphia dot net Aug-22-04 03:59:08
A good way to look at this get_user_info(who, command, variable, howmany) new name[32] - declaring variable name with a buffer of 32 id - This is the id of the client you would like to get the name of.. This could also be a number! "name" - This is basicly in short the command you would like info back on. name - Assigns the clients username to the variable name. So how do you use this:
Code:
public client_connect(id) {      new name[32]      get_user_info(id, "name", name, 31)      set_hudmessage(200, 0, 0, 0.05, 0.65, 2, 0.02, 30.0, 0.03, 0.3, 2)      show_hudmessage(0, "%s has Entered",name) } When the Client connects it will send a hud message "{clan}playername has Entered" Other uses might be to get a user's rates.  A couple commands for that would be. new rate[32] get_user_info(id, "rate", rate, 31)       OR get_user_info(id, "cl_rate", rate, 31)       OR get_user_info(id, "cl_cmdrate", rate, 31) //One more example new getfps[32] get_user_info(id, "fps_max", getfps, 31) If I made any typos sorry you guys BillyTheKid

Does that help at all?
ZeonSoldier is offline
Send a message via MSN to ZeonSoldier
capndurk
Senior Member
Join Date: Feb 2006
Old 03-18-2006 , 02:06  
Reply With Quote #3

That cvarlist thing is cool... I didn't know about that.

Obviously, the client cvars interact with the server, and so therefore can probably be gathered from the server and reproduced and used. If a server can modify that information, I should hope they'd be able to retrieve it all also.

With the team variable, I realize there are other commands for that information, but the commands I'm focusing on don't seem to have an obvious way of being identified.

As for what Billy The Kid wrote, I read it and disagree with some of the information, mostly in that I don't think cl_cmdrate and fps_max are able to be obtained by get_user_info(). I'll have to test this further, but I'm 72.6% sure right now that get_user_info won't gather that information.

With all that said, thanks for trying to help. The cvarlist thing will help to identify all the client commands available, but I still have more research to do, and any other help is appreciated.
capndurk is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 03-18-2006 , 08:39  
Reply With Quote #4

get/set_client_info() can only be used with the variables that are set with setinfo (at least i think so)

use query_client_cvar() to fetch cvar values from the client dll
http://www.amxmodx.org/funcwiki.php?go=func&id=854
__________________
plop
p3tsin is offline
capndurk
Senior Member
Join Date: Feb 2006
Old 03-18-2006 , 11:10  
Reply With Quote #5

Dude p3tsin, you're the man. I think this is exactly what I needed.

Two more things, though... Do you know anything about how to get the variables set with setinfo, and do you know anything other than what the funcwiki says about how to use query_client_cvar?

Thanks again.
capndurk 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 01:05.


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