Raised This Month: $ Target: $400
 0% 

question get_user_name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-24-2013 , 18:43   Re: question get_user_name
Reply With Quote #10

Quote:
Originally Posted by vamppa View Post
thanks, so I can use static for getting steamid?
PHP Code:
static sCID[32];

public 
client_putinserver(id
{
    
get_user_authididsCID31 );

is it good to use on variables that dont get changed often? (mapname,hostname)
do statics get refreshed on map change?
Tip: You should not use any static variables until we tell you that it is necessary.


Quote:
Originally Posted by vamppa View Post
yeah your right about getting rid of the name but believe it or not for this mod its mainly used for easy reference to know who the person is. we are a small community that know eachother by their registered names. just putting an easy face behind the steamid if the name is correct.
otherwise we look up their steamid in our database, it saves a lot of time if we dont always have to do this. I do have concerns about it not working propperly on One idea I have in mind but not yet started working on, so will see : )
You have flawed logic. What if a person joins the server with the name "asdf" and then changes it to their real name (the name that you know) half way through the map? Your messages will say "asdf" and then everybody will be thinking "who is 'asdf'?".


Quote:
Originally Posted by vamppa View Post
ok I'll take your word for it but am curious as to why? is it an cpu consuming method ?
which wouldn't make sense as it sounds like thats what the method is trying to avoid.
Because 1) it is unnecessary to cache the names and 2) you will not be able to comprehend it, IMO (and I don't feel like re-learning how to do it).

Quote:
Originally Posted by vamppa View Post
could you give me an example of how to cache getting steamid ?
am pretty new to this and want to learn.
Code:
new g_szSteamIDs[33][30];

// . . .

public client_authorized(id)
{
	get_user_authid(id, g_szSteamIDs[id], charsmax(g_szSteamIDs[]));
}
__________________
fysiks 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 06:22.


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