Raised This Month: $ Target: $400
 0% 

breaks in hudmessages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 08-13-2010 , 02:57   breaks in hudmessages
Reply With Quote #1

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.
hornet is offline
platzpatrone
Veteran Member
Join Date: Apr 2007
Location: Germany
Old 08-13-2010 , 03:25   Re: breaks in hudmessages
Reply With Quote #2

just use: ^n

like: Hello World this is my^nHudmessage with 2 lines^nOr 3 lines^n or 4 lines^nAnd so on
platzpatrone is offline
Zpoke
Senior Member
Join Date: Aug 2009
Location: Sweden
Old 08-14-2010 , 10:30   Re: breaks in hudmessages
Reply With Quote #3

PHP Code:
set_hudmessage(85255255, -1.0, -1.006.012.0)
show_hudmessage(id"Health: %s^nXP: %s"PlayerHealthPlayerXP); 
Zpoke is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-14-2010 , 10:35   Re: breaks in hudmessages
Reply With Quote #4

Quote:
Originally Posted by Zpoke View Post
PHP Code:
show_hudmessage(id"Health: %s^nXP: %s"PlayerHealthPlayerXP); 

PHP Code:
show_hudmessage(id"Health: %d^nXP: %d"PlayerHealthPlayerXP); 
__________________
Bugsy is offline
Zpoke
Senior Member
Join Date: Aug 2009
Location: Sweden
Old 08-14-2010 , 10:52   Re: breaks in hudmessages
Reply With Quote #5

oops..

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

Last edited by Zpoke; 08-14-2010 at 10:55.
Zpoke is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-14-2010 , 11:06   Re: breaks in hudmessages
Reply With Quote #6

%i and %d for integer
%f for float
%s for string
__________________
Bugsy is offline
Reply


Thread Tools
Display Modes

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 21:54.


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