Raised This Month: $ Target: $400
 0% 

get_user_name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bladell
Senior Member
Join Date: Jun 2012
Old 08-05-2013 , 03:52   get_user_name
Reply With Quote #1

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.
Bladell is offline
Old 08-05-2013, 04:02
LordOfNothing
This message has been deleted by ConnorMcLeod. Reason: troll, or posting random confusing code, or posting for posts count
Old 08-05-2013, 04:04
LordOfNothing
This message has been deleted by ConnorMcLeod. Reason: troll, or posting random confusing code, or posting for posts count
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
Bladell
Senior Member
Join Date: Jun 2012
Old 08-05-2013 , 11:16   Re: get_user_name
Reply With Quote #5

I don't understand it...For example, if I (Bladell) execute a command on SOMEBODY, and I want the plugin to show "Bladell execute the command x on SOMEBODY", how do I get my name and the name of SOMEBODY?
Bladell is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-05-2013 , 11:27   Re: get_user_name
Reply With Quote #6

Quote:
Originally Posted by Bladell View Post
I don't understand it...For example, if I (Bladell) execute a command on SOMEBODY, and I want the plugin to show "Bladell execute the command x on SOMEBODY", how do I get my name and the name of SOMEBODY?
See the code for amx_kick. Everything you need to know is there.
__________________
fysiks 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 15:45.


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