AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   breaks in hudmessages (https://forums.alliedmods.net/showthread.php?t=135135)

hornet 08-13-2010 02:57

breaks in hudmessages
 
Is it possible to put a break in a hud message when i use show_hudmessage() ?
Because I want to display 2 lines in the one string.
So I can have:

Health: ##
XP: ##

In the one string. So the same effect as <br> which I believe only works with motd's.
Help please.
Thanks.

platzpatrone 08-13-2010 03:25

Re: breaks in hudmessages
 
just use: ^n

like: Hello World this is my^nHudmessage with 2 lines^nOr 3 lines^n or 4 lines^nAnd so on :)

Zpoke 08-14-2010 10:30

Re: breaks in hudmessages
 
PHP Code:

set_hudmessage(85255255, -1.0, -1.006.012.0)
show_hudmessage(id"Health: %s^nXP: %s"PlayerHealthPlayerXP); 


Bugsy 08-14-2010 10:35

Re: breaks in hudmessages
 
Quote:

Originally Posted by Zpoke (Post 1270601)
PHP Code:

show_hudmessage(id"Health: %s^nXP: %s"PlayerHealthPlayerXP); 


:arrow:
PHP Code:

show_hudmessage(id"Health: %d^nXP: %d"PlayerHealthPlayerXP); 


Zpoke 08-14-2010 10:52

Re: breaks in hudmessages
 
oops..

but %i and %s is for numbers, right ?:oops:

Bugsy 08-14-2010 11:06

Re: breaks in hudmessages
 
%i and %d for integer
%f for float
%s for string


All times are GMT -4. The time now is 21:54.

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