04.06.2010, 13:50
You can use this function.
pawn Код:
SendSplittedMessage(playerid, color, const msg[], maxlen)
{
new firstpos, lastpos;
new part[128];
new count = 1;
new length = strlen(msg);
for(new p=0; p < length; p++)
{
if(msg[p] == ' ')
{
lastpos = p;
}
if(p == length-1)
{
lastpos = length;
}
if(p >= count*maxlen || p == length-1)
{
if(lastpos == firstpos) { lastpos = count*maxlen; }
strmid(part, msg, firstpos, lastpos, 128);
firstpos = lastpos;
count++;
SendClientMessage(playerid, color, part);
}
}
}