Raised This Month: $ Target: $400
 0% 

get_user_name


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-05-2013 , 05:31   Re: get_user_name
Reply With Quote #4

Quote:
Originally Posted by Bladell View Post
I don't uderstand something...how know the plugin what name, ip or id to get?
For example here:
Code:
	new name[ 32 ], name2[ 32 ], ip2[ 16 ];
	get_user_name( id, name, charsmax( name ) );
	get_user_name( player, name2, charsmax( name2 ) );
	get_user_ip( player, ip2, charsmax( ip2 ), 1 );
name = player name
name2 = admin name
id means admin and player = player?...sorry, I don't get it.
It doesn't matter what the variables are called. It only matters what value the variable contains. "id" just contains an entity number that corresponds to the person that is using the command (assuming you are looking at code from admin.sma). Likewise, the variable "player" just contains an entity number corresponding to a player on the server. So, the output of those functions are are not dependent on the variable names (as it seems you are assuming) but rather the actual value they contain.
__________________
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 15:45.


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