Split /me | /do message to next line
#1

Hey..
I have seen that it's possible to split /me and /do (roleplay) messages to next line, if message is too long..
Example;
From:
Quote:

*Name_Surname word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12 word13

To:
Quote:

*Name_Surname word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 ...
... word11 word12 word13

Someone said that there's include for it, but i can't find it..
Reply
#2

Not sure if this works:

pawn Код:
public OnPlayerText(playerid, text[])
{
     StrSplit(text);
     return 0;
}

stock StrSplit(text[])
{
     new string[128], Length = strlen(text) ;
     if(Length > 80)
     {
          strmid(string, text, 0, Length / 2);
          SendClientMessageToAll(COLOR, string);
          strmid(string, text, Length / 2, Length);
          SendClientMessageToAll(COLOR, string);
     }
     else
     {
          SendClientMessageToAll(COLOR, text);
     }
}
You should probably do some formating to get everything as you want.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)