AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   server_print and get_user_name (https://forums.alliedmods.net/showthread.php?t=51410)

gzus 02-17-2007 12:59

server_print and get_user_name
 
does anyone know of a way to print the users name/authid in the console? i cant get it to work anyway, ive tried creating new strings and arrays to hold the data but it never displays in console this is basicly what id like to do but it doesnt work.

server_print("--MHO MOD-- [Race Menu] Displayed for: get_user_name(id)",0.01)

FormulaZero 02-17-2007 13:03

Re: server_print and get_user_name
 
PHP Code:

get_user_authid 

and


PHP Code:

get_user_name 

and


PHP Code:

client_print(idprint_console"INSERT TEXT HERE"


%s will display the user name, but I don't know about the authid. Try %id

gzus 02-17-2007 13:09

Re: server_print and get_user_name
 
i know thats how u'd usually pull the user name, i understand that, but what im asking is how do i get it to display in the console, using the line of code:

server_print("--MHO MOD-- [Race Menu] Displayed for: get_user_name(id)",0.01)

or even:
server_print("--MHO MOD-- [Race Menu] Displayed for: get_user_name",0.01)


this only displays the text "get_user_name(id)". or "get_user_name".. it does not show the actual user name, does anyone know how i can display the actual user name of who ever this code is ran for?

P34nut 02-17-2007 13:12

Re: server_print and get_user_name
 
Code:
public myfunc(id) {    new szName[32], szAuthId[32]    get_user_name(id, szName, 31)    get_user_authid(id, szAuthId, 31)        server_print("Name: %s AuthId: %s", szName, szAuthId) }

gzus 02-17-2007 13:17

Re: server_print and get_user_name
 
sexy sexy TY TY TY TY!! +karma for p34nut!!

MaximusBrood 02-17-2007 18:10

Re: server_print and get_user_name
 
FormulaZero: Please don't try to help if you have no clue what you are talking about.

FormulaZero 02-17-2007 18:14

Re: server_print and get_user_name
 
I won't attempt to start a flaming war with you. Good Day.

P34nut 02-17-2007 18:18

Re: server_print and get_user_name
 
But MaximusBrood is right

FormulaZero 02-17-2007 18:23

Re: server_print and get_user_name
 
Exactly why I won't attemp to start a flame war.

Hi P34nut

gzus 02-17-2007 18:24

Re: server_print and get_user_name
 
im just not too good with the strings n what not, i seen that being used a few times with the %s and %i but i dunno the difference, and i couldnt get any to work with a trial/error.. thanks tho guys


All times are GMT -4. The time now is 00:35.

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