Posts: 2,857
Threads: 62
Joined: Dec 2010
Reputation:
0
SA-MP chat does that automatically i think, whats the problem?
Posts: 2,938
Threads: 162
Joined: May 2010
Posts: 162
Threads: 36
Joined: May 2011
Reputation:
0
can i post it without any editing because i cant edit the screenshot i dont have anything program picture editing
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
I am hoping that someone could create and release something similar to what LS-RP has where it splits the text into multiple lines if you go over 128 characters.
Posts: 2,938
Threads: 162
Joined: May 2010
Quote:
Originally Posted by RealCop228
I am hoping that someone could create and release something similar to what LS-RP has where it splits the text into multiple lines if you go over 128 characters.
|
I see my post was completely ignored, anyways look at this...
pawn Код:
#define MAX_CHARS_PER_LINE 80
#define FINAL_DOTS
stock sendLongMessage( playerid , color , message[] )
{
new len = strlen(message),
NumberOLines = len / MAX_CHARS_PERLineString;
if( ( len % MAX_CHARS_PERLineString ) ) NumberOLines++;
new LineString[MAX_CHARS_PERLineString + 5];
new CurrentLine;
while( CurrentLine < NumberOLines )
{
strmid( LineString, message, ( CurrentLine * MAX_CHARS_PER_LINE ), ( CurrentLine * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );
////////////
#if defined FINAL_DOTS
if( NumberOLines > 1 )
{
if( CurrentLine == 0 )
{
format( LineString, sizeof LineString, "%s ...", LineString );
}
else if( CurrentLine > 0 && ( CurrentLine + 1 ) < NumberOLines )
{
format( LineString, sizeof LineString, "... %s ...", LineString );
}
else
{
format( LineString, sizeof LineString, "... %s", LineString );
}
}
#endif
////////////
SendClientMessage( playerid, color, LineString );
///////////
CurrentLine++;
}
return 1;
}