Raised This Month: $ Target: $400
 0% 

server_print and get_user_name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gzus
Member
Join Date: Jan 2007
Old 02-17-2007 , 12:59   server_print and get_user_name
Reply With Quote #1

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)
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com
gzus is offline
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 02-17-2007 , 13:03   Re: server_print and get_user_name
Reply With Quote #2

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

Last edited by FormulaZero; 02-17-2007 at 13:08.
FormulaZero is offline
gzus
Member
Join Date: Jan 2007
Old 02-17-2007 , 13:09   Re: server_print and get_user_name
Reply With Quote #3

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?
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com
gzus is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 02-17-2007 , 13:12   Re: server_print and get_user_name
Reply With Quote #4

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) }
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
gzus
Member
Join Date: Jan 2007
Old 02-17-2007 , 13:17   Re: server_print and get_user_name
Reply With Quote #5

sexy sexy TY TY TY TY!! +karma for p34nut!!
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com
gzus is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 02-17-2007 , 18:10   Re: server_print and get_user_name
Reply With Quote #6

FormulaZero: Please don't try to help if you have no clue what you are talking about.
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 02-17-2007 , 18:14   Re: server_print and get_user_name
Reply With Quote #7

I won't attempt to start a flaming war with you. Good Day.
FormulaZero is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 02-17-2007 , 18:18   Re: server_print and get_user_name
Reply With Quote #8

But MaximusBrood is right
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
gzus
Member
Join Date: Jan 2007
Old 02-17-2007 , 18:24   Re: server_print and get_user_name
Reply With Quote #9

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
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com
gzus is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 02-17-2007 , 18:27   Re: server_print and get_user_name
Reply With Quote #10

%s -> Character arrays (String)
%i -> Integers
%d -> Integers
%f -> float integers
There are more but these will be used most..
__________________
All you need to change the world is one good lie and a river of blood
P34nut 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 00:35.


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