SA-MP Forums Archive
Split /me | /do message to next line - 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: Split /me | /do message to next line (/showthread.php?tid=236386)



Split /me | /do message to next line - SaW_[VrTx] - 07.03.2011

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


Re: Split /me | /do message to next line - Cameltoe - 07.03.2011

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.