How to make text Wrap? -
Deal-or-die - 14.03.2011
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
Re: How to make text Wrap? -
CyNiC - 14.03.2011
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.
Re: How to make text Wrap? -
Deal-or-die - 14.03.2011
LS-RP seems to be able to make the chat send 2 lines of text from one person Strangely enough
Re: How to make text Wrap? -
Pz - 14.03.2011
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.
Re: How to make text Wrap? -
Deal-or-die - 14.03.2011
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
Re: How to make text Wrap? -
Pz - 14.03.2011
At the mean while, go ahead and give yourself a try in normal chat, and in /n(ewbie) chat for example.
Re: How to make text Wrap? -
Deal-or-die - 14.03.2011
I did, it just goes in one straight line and cuts off my chat... -.-
Re: How to make text Wrap? -
Tee - 14.03.2011
You want to send 2 chat from 1 person?
Re: How to make text Wrap? -
Jeffry - 14.03.2011
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.
Re: How to make text Wrap? -
Macluawn - 14.03.2011
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