AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Several Arguments for show_hudmessage? (https://forums.alliedmods.net/showthread.php?t=129208)

Mandiii 06-10-2010 08:01

Several Arguments for show_hudmessage?
 
Is it possible to write something along these lines:

PHP Code:

show_hudmessage(0killer" has eaten "hamburgers[killer], " hamburgers"


Arkshine 06-10-2010 08:07

Re: Several Arguments for show_hudmessage?
 
show_hudmessage(0, killer, " has eaten %d hamburgers", hamburgers[killer])

Sylwester 06-10-2010 08:37

Re: Several Arguments for show_hudmessage?
 
You made little mistake.
PHP Code:

new name[32]
get_user_name(killername31)
show_hudmessage(0"%s has eaten %d hamburgers"namehamburgers[killer]) 


Mandiii 06-10-2010 10:18

Re: Several Arguments for show_hudmessage?
 
Could you give me a brief explanation why you are writing %d and %s.

drekes 06-10-2010 12:48

Re: Several Arguments for show_hudmessage?
 
%s means you want to put a string in there.
%d means a number.
%i means integer value.
%f.1 means a float and 1 means how many numbers behind . will be shown. i'm not completely sure about %d someone else could explain it

Brreaker 06-10-2010 12:55

Re: Several Arguments for show_hudmessage?
 
%d comes from data, but it prints only integers so you can use %d or %i in the same circumstances :)


All times are GMT -4. The time now is 05:24.

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