SA-MP Forums Archive
New line - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: New line (/showthread.php?tid=500962)



New line - Ananisiki - 15.03.2014

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


Re: New line - CuervO - 15.03.2014

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.


Re: New line - Ananisiki - 15.03.2014

Yes i am, what should i do?


Re: New line - Jefff - 15.03.2014

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"



Re: New line - Ananisiki - 15.03.2014

Need to do a new line from in-game..


Re: New line - Ananisiki - 15.03.2014

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,



Re: New line - Jefff - 16.03.2014

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


Re: New line - Ananisiki - 16.03.2014

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