SA-MP Forums Archive
Split talking text string... - 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: Split talking text string... (/showthread.php?tid=305559)



Split talking text string... - Mini` - 22.12.2011

How would one go about splitting up talking text?
This is what I mean...
If you're typing a really long message, you have to be careful because some of it might go off the screen. However, I've been on a server before where you don't have to worry. If the message is too long, the server simply split it where it needed to be split, and created a new string/line for the rest of the message.

I've always wondered why this little addition wasn't implemented into all servers, as I do see it to be a simple, effective, and original idea.


Re: Split talking text string... - coole210 - 23.12.2011

Код:
if(strlen(Text) > 128)
{
format(Text,128,"%s",Text);
SendClientMessage(playerid,color,Text);
strmid(Text,Text,128,256,256);
SendClientMessage(playerid,color,Text);
}
Untested


Re: Split talking text string... - Mini` - 23.12.2011

If this works I'm going to make love to your +Rep.