Problem with sscanf when create object and set materialtext. - 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: Problem with sscanf when create object and set materialtext. (
/showthread.php?tid=432450)
Problem with sscanf when create object and set materialtext. -
PaulDinam - 22.04.2013
Okay so I made a test CMD to test objectmaterial and when I try to write text and then \n for a new line... it doesn't work/.
Re: Problem with sscanf when create object and set materialtext. -
TomatoRage - 22.04.2013
Its happen to me 2 i don't know why :/
Re: Problem with sscanf when create object and set materialtext. -
Babul - 22.04.2013
the \n doesnt work when inputting text - the script will eat it!
you can parse f.ex a # char and then replace it with the \n
i tried something similar to be able to change colors in the main chat:
pawn Код:
found=strfind(result[0],"#r",true);
if(found>-1)
{
format(codestring,sizeof(codestring),"{ff3333}");
pos=found+strlen(codestring);
NeedToRecalc++;
strmid(string1,result,0,found);
strmid(string2,result,found+2,256);
format(result,sizeof(result),"%s%s%s",string1,codestring,string2);
}
feel free to steal&modify it, hahah
Re: Problem with sscanf when create object and set materialtext. -
PaulDinam - 22.04.2013
Quote:
Originally Posted by Babul
the \n doesnt work when inputting text - the script will eat it!
you can parse f.ex a # char and then replace it with the \n
i tried something similar to be able to change colors in the main chat:
pawn Код:
found=strfind(result[0],"#r",true); if(found>-1) { format(codestring,sizeof(codestring),"{ff3333}"); pos=found+strlen(codestring); NeedToRecalc++; strmid(string1,result,0,found); strmid(string2,result,found+2,256); format(result,sizeof(result),"%s%s%s",string1,codestring,string2); }
feel free to steal&modify it, hahah
|
Can you explain how do I use it please? or can you make a stock for me please?

Like to replace the {FFFFFF} colors and \n? I would be really happy and REP you
Re: Problem with sscanf when create object and set materialtext. -
PaulDinam - 22.04.2013
Help please?