How to make text Wrap?
#1

Hey Fellow Scripters once again :P (Gotta stop saying that, most of you probably hate me by now)
I was just lookin into how i would get the Chat box to Wrap so if you type something to large it just starts on another line EG
Deal-Or-Die Say: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(Inst ead of stopping here continues)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Thanks a lot in advance
Reply
#2

The line of the text sended by the players have limit of 128 caracters.
Do it's only possible changing the OnPlayerText for SendClientMessage with the text of the player.
Reply
#3

LS-RP seems to be able to make the chat send 2 lines of text from one person Strangely enough
Reply
#4

Quote:
Originally Posted by Deal-or-die
Посмотреть сообщение
LS-RP seems to be able to make the chat send 2 lines of text from one person Strangely enough
I think all SA-MP servers used to be default (which is the one you're talking about), to continue under the senders text.

The ones that go under your text are in the normal chat, but the rest are commands thats why it goes in the same line without changing. Anyways, good luck finding a better solution than mine.
Reply
#5

Yes thats what i want
"
Default Re: How to make text Wrap?
Quote:
Originally Posted by Deal-or-die View Post
LS-RP seems to be able to make the chat send 2 lines of text from one person Strangely enough
I think all SA-MP servers uses to be default (which is the one you're talking about), to continue under the senders text." and no its not default
Reply
#6

At the mean while, go ahead and give yourself a try in normal chat, and in /n(ewbie) chat for example.
Reply
#7

I did, it just goes in one straight line and cuts off my chat... -.-
Reply
#8

You want to send 2 chat from 1 person?
Reply
#9

Try:
pawn Код:
public OnPlayerText(playerid, text[])
{
    TESTAGAIN:
    if(strlen(text) > 100)
    {
        new string[101];
        format(string, 101, "%s", text);
        SendPlayerMessageToAll(playerid, string);
        strdel(text, 0,100);
        goto TESTAGAIN;
    }
    SendPlayerMessageToAll(playerid, text);
    return 0;
}
Dont know if it works, just typed this fast.
Reply
#10

pawn Код:
SendCustomPlayerMessage(playerid, color, text[])
{
    if(strlen(text) > 64)
    {
        new text1[65],
            text2[65];
           
        strmid(text2, text, 64, 128);
        strmid(text1, text, 0, 64);
               
        format(string, 128, "%s...", text1);
        SendClientMessage(playerid, color, string);
       
        format(string, 128, "...%s", text2);
        SendClientMessage(playerid, color, string);
    }
    else SendClientMessage(playerid, color, text);
}
Ex:
SendCustomPlayerMessage(0, 0xAA3333AA, "Sam says: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa");

Will output

Sam says: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaa...
...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)