Problem with sscanf when create object and set materialtext.
#1

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/.

Reply
#2

Its happen to me 2 i don't know why :/
Reply
#3

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
Reply
#4

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
Reply
#5

Help please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)