New line
#1

I have tryed \n to make a new line on a billboard, but it doesn't work, what is it?
Reply
#2

If you are doing it in game, \'s are not processed since strings could get injected (the same way % are converted to #). It will only work scriptwise.
Reply
#3

Yes i am, what should i do?
Reply
#4

Use this and if you want use \n type |

pawn Код:
ReplaceChar(string[], ch = '|')
{
    for(new i=0 string[i] != 0; i++)
        if(string[i] == ch)
            string[i] = '\n';
}
example

pawn Код:
cmdtext is "Hello|World"
ReplaceChar(cmdtext);
cmdtext is now "Hello\nWorld"
Reply
#5

Need to do a new line from in-game..
Reply
#6

So, i created a text on object id 4729 (it was a perfekt object for a billboard)

but the file looks liks this;

pawn Код:
4729, -11.769983, 1573.777465, 29.648555, 0.000000, 0.000000, -53.400096, -99,       {0095FF}Police's, 90, Arial, 30, 1,
Reply
#7

You must write to file with | and when loading use replacing | to \n
Reply
#8

This is the line i got in the saving file..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)