Raised This Month: $ Target: $400
 0% 

char '^n' = new line, char x = tab space


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpaceRip
Junior Member
Join Date: Aug 2012
Old 08-22-2012 , 08:39   char '^n' = new line, char x = tab space
Reply With Quote #1

hello, i need to know that tab space char.
I know that new line one was '^n' and for tab there was something similar.
one more thing
i created 2 string variables.
inside of one variable (strvar1) i write example "test this text"
and the ohter (strvar2) will be "and hope it works!"
Now i set hudmessage just like this
set_hudmessage(....)
show_hudmessage( 0, "%s", strvar1 )
set_hudmessage(....)
show_hudmessage( 0, "%s", strvar2 )
and the text will be : test this text and hope it works!
i want to show one text with many colors.
this is my way how i do it this right now with spaces
PHP Code:
new strvar[5][128]
func( var ,d[] )
new 
lk
for(0maxcharsl++)
{
    for(
05k++)
    {
        if( 
!= var )
            
strvar[k][l] = d[l]
        else
            
strvar[k][l] = ' '   
    
}

with spaces i waste too many hudmessage char slots.
SpaceRip is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-22-2012 , 08:50   Re: char '^n' = new line, char x = tab space
Reply With Quote #2

^t
__________________
Arkshine is offline
SpaceRip
Junior Member
Join Date: Aug 2012
Old 08-28-2012 , 13:25   Re: char '^n' = new line, char x = tab space
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
^t
This is same like space in hudmessage.
SpaceRip is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-28-2012 , 19:10   Re: char '^n' = new line, char x = tab space
Reply With Quote #4

Quote:
Originally Posted by SpaceRip View Post
This is same like space in hudmessage.
That's expected. The game won't differentiate between different kinds of whitespace in HUD messages, chat message, or in console. It will put a space for any kind of whitespace (including the tab character).

The only place that you might see a tab work is MOTD like you would expect is in an MOTD that does not use HTML.
__________________

Last edited by fysiks; 08-28-2012 at 19:11.
fysiks 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 05:42.


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