[HELP] Some question about dialog and "\n" -
FuznesS - 08.09.2013
Hey, I'm working on Spray tag system, and everything works fine, but when I'm using too much letters,
some part of them just cutted and its looks like some part to of the letters is behind the wall
Picture for example:
http://i39.tinypic.com/2hwi72e.png
and my question is how can I know if some player wrote \n inside the dialog and make it in the mode
like if player wrote in the dialog Test\nTest123
its will make the text like that
"
Test
Test123
"
Thanks for help.
Re: [HELP] Some question about dialog and "\n" -
FuznesS - 08.09.2013
*BUMP* moved to page 3.
Re: [HELP] Some question about dialog and "\n" -
Jefff - 09.09.2013
Use | and replace | to \n in your own function
Re: [HELP] Some question about dialog and "\n" -
Pottus - 09.09.2013
SetObjectMaterialText() does not accept that it will just show anything you put as the string on one line. If you want more than one line you'll need to use an additional object.
Re: [HELP] Some question about dialog and "\n" -
FuznesS - 09.09.2013
Quote:
Originally Posted by [uL]Pottus
SetObjectMaterialText() does not accept that it will just show anything you put as the string on one line. If you want more than one line you'll need to use an additional object.
|
When I'm writing in the gamemode SetObjectMaterialText Sometest123\nTest its works
but when I'm writing it in the dialog its not works because the dialog dosen't support it, so I want to know how to make the dialog to support it, like if player wrote \n in the dialog, it will replace it with '\n' in the gamemode.
like bbcode just in pawn.
Quote:
Originally Posted by Jefff
Use | and replace | to \n in your own function
|
That's the problem, I don't know how to do it, because of that I made this topic,
maybe you guys can teach me how to do it.
Re: [HELP] Some question about dialog and "\n" -
Jefff - 09.09.2013
pawn Код:
Check(txt[])
{
new d=0;
while(txt[d])
{
if(txt[d] == '|')
txt[d] = '\n';
d++;
}
}
pawn Код:
input - Test|Test123
Check(inputtext);
output - Test\nTest123
pawn Код:
Check(inputtext);
SetObjectMaterialText(...);
Re: [HELP] Some question about dialog and "\n" -
FuznesS - 09.09.2013
Quote:
Originally Posted by Jefff
pawn Код:
Check(txt[]) { new d=0; while(txt[d]) { if(txt[d] == '|') txt[d] = '\n'; d++; } }
pawn Код:
input - Test|Test123 Check(inputtext); output - Test\nTest123
pawn Код:
Check(inputtext); SetObjectMaterialText(...);
|
Thank you very much, Its works great, thank you so much.
you just made my day
last question, if I want to made 'g' symbol as embed color for example
if players wrote Test123{g}Test1
Test1 will be green, how to make it?
Re: [HELP] Some question about dialog and "\n" -
FuznesS - 10.09.2013
BUMP moved to page 3 again.
Re: [HELP] Some question about dialog and "\n" -
Dragonsaurus - 10.09.2013
On top of your script:
Re: [HELP] Some question about dialog and "\n" -
FuznesS - 10.09.2013
Quote:
Originally Posted by Dragonsaurus
|
Your line makes this error
error 074: #define pattern must start with an alphabetic character