Raised This Month: $ Target: $400
 0% 

question get_user_name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 07-24-2013 , 14:49   Re: question get_user_name
Reply With Quote #9

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?

Quote:
Getting the name when you need it is usually done because it makes sense. If, for some odd reason, you don't care if the name is correct then you can cache it (if you don't care about the accurateness of the name then you should just get rid of it entirely, IMO). Also, depending on how you use the name, it might not work if it's not up-to-date.
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 : )
Quote:
There are ways to cache and keep names up-to-date but I would not recommend them for you.
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.

could you give me an example of how to cache getting steamid ?
am pretty new to this and want to learn.
vamppa 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