SA-MP Forums Archive
Text Splitting with Continuous Embedded Color - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Text Splitting with Continuous Embedded Color (/showthread.php?tid=260814)



Text Splitting with Continuous Embedded Color - Cyanide - 10.06.2011

Fixed.


Re: Text Splitting with Continuous Embedded Color - DeathOnaStick - 10.06.2011

When talking about splitting text there is just strtok or sscanf in my mind. Why don't you use one of these? Or did I get something wrong?


Re: Text Splitting with Continuous Embedded Color - Cyanide - 10.06.2011

Quote:
Originally Posted by DeathOnaStick
View Post
When talking about splitting text there is just strtok or sscanf in my mind. Why don't you use one of these? Or did I get something wrong?
Thanks for the reply, you're getting it wrong indeed. Here's an example of how I use that function:

pawn Code:
#define SendClientMessageEx(%0,%1,%2) \
           SendClientMessage(%0, %1, splitString(%2, 1); \
           if(strlen(%2) > 123) SendClientMessage(%0, %1, splitString(%2, 2)
This is the above macro in output:

Quote:

Cyanide: Hello, my name is Cyanide, I am from Ontario Canada. I am a San Andreas Multiplayer player. I have been playing ...
... Grand Theft Auto for several years now.

As you can see, it will automatically continue the message.


Re: Text Splitting with Continuous Embedded Color - Cyanide - 11.06.2011

Bump.


Re: Text Splitting with Continuous Embedded Color - HP - 11.06.2011

May I suggest you to just use the SendExtendedChat include, that TheXII made? It has exactly the same functionality and supports even color embedding as well as specifying the number of characters on one line and maximum lines in the code.

You can find it over here.