get_user_name vs client_infochanged variable
Which one is better? using the native get_user_name or creating a variable on client_authorized and hooking the change on client_infochanged?
Also I tried to do get_user_name in client_infochanged, no success although it works to hook post FM_ClientUserInfoChanged in fakemeta, why? |
Re: get_user_name vs client_infochanged variable
Unless you are going to retrieve users' names hundreds of times a second (if you are, you are probably doing something seriously wrong), it doesn't matter, just use get_user_name().
|
Re: get_user_name vs client_infochanged variable
Because using get_user_name() in client_infochanged() it's retrieving the 'Old Name' you have to use get_user_info to retrieve the new name.
For the sake of doing good things i believe is better to use the second operation, taking the name in an variable ant connnect+/and at client_infochanged(). |
Re: get_user_name vs client_infochanged variable
Quote:
|
Re: get_user_name vs client_infochanged variable
I agree with fysiks. Just use the native...
|
Re: get_user_name vs client_infochanged variable
Quote:
Quote:
If it's more comfortable to use a variable, should I or this way is a waste of resources? |
Re: get_user_name vs client_infochanged variable
We can't give you any more specific information without specific context. In general, if you need the player's name, just get the player's name.
|
Re: get_user_name vs client_infochanged variable
Quote:
PHP Code:
|
Re: get_user_name vs client_infochanged variable
Quote:
|
Re: get_user_name vs client_infochanged variable
Quote:
|
| All times are GMT -4. The time now is 23:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.