16.02.2013, 02:52
Use this instead of SendClientMessage and increase your array size.
pawn Код:
#define MAX_CHARS_PER_LINE (80)
// Max characters per line.
#define FINAL_DOTS
// Remove it if you don't want dots for new lines.
stock BigMessage(playerid, colr, message[])
{
new len = strlen(message),
_iL = len / MAX_CHARS_PER_LINE;
if( ( len % MAX_CHARS_PER_LINE ) ) _iL++;
new _Line[MAX_CHARS_PER_LINE + 5];
new _:_i@Index;
while( _i@Index < _iL )
{
if( _i@Index == 0 )
strmid( _Line, message, ( _i@Index * MAX_CHARS_PER_LINE ), ( _i@Index * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );
else
strmid( _Line, message, ( _i@Index * MAX_CHARS_PER_LINE ), ( _i@Index * MAX_CHARS_PER_LINE ) + MAX_CHARS_PER_LINE );
#if defined FINAL_DOTS
if( _iL > 1 )
{
if( _i@Index == 0 )
{
format( _Line, sizeof _Line, "%s ...", _Line );
}
else if( _i@Index > 0 && ( _i@Index + 1 ) < _iL )
{
format( _Line, sizeof _Line, "... %s ...", _Line );
}
else
{
format( _Line, sizeof _Line, "... %s", _Line );
}
}
#endif
////////////
SendClientMessage(playerid, colr, _Line );
///////////
_i@Index++;
}
}