PDA

View Full Version : Several Arguments for show_hudmessage?


Mandiii
06-10-2010, 08:01
Is it possible to write something along these lines:

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

Arkshine
06-10-2010, 08:07
show_hudmessage(0, killer, " has eaten %d hamburgers", hamburgers[killer])

Sylwester
06-10-2010, 08:37
You made little mistake.

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

Mandiii
06-10-2010, 10:18
Could you give me a brief explanation why you are writing %d and %s.

drekes
06-10-2010, 12:48
%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
%d comes from data, but it prints only integers so you can use %d or %i in the same circumstances :)