Text Splitting with Continuous Embedded Color
#1

Fixed.
Reply
#2

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?
Reply
#3

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

Bump.
Reply
#5

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


Forum Jump:


Users browsing this thread: 3 Guest(s)