AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   char '^n' = new line, char x = tab space (https://forums.alliedmods.net/showthread.php?t=193722)

SpaceRip 08-22-2012 08:39

char '^n' = new line, char x = tab space
 
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.

Arkshine 08-22-2012 08:50

Re: char '^n' = new line, char x = tab space
 
^t

SpaceRip 08-28-2012 13:25

Re: char '^n' = new line, char x = tab space
 
Quote:

Originally Posted by Arkshine (Post 1778757)
^t

This is same like space in hudmessage.

fysiks 08-28-2012 19:10

Re: char '^n' = new line, char x = tab space
 
Quote:

Originally Posted by SpaceRip (Post 1785203)
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.


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

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