Quote:
Originally Posted by Bladell
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.
__________________