29.11.2012, 11:39
pawn Code:
stock SendPlayerExtendedMessage(playerid, color, const string[])
{
new firstString[128],
secondString[128],
finalStringLINE1[128],
finalStringLINE2[128];
if(strlen(string) > 70) // here you can choose the lenght of the first string
{
format(firstString, sizeof(firstString), string);
format(secondString, sizeof(secondString), string);
strdel(firstString, 70, 140);
strdel(secondString, 0, 70);
format(finalStringLINE1, sizeof(finalStringLINE1), "%s ...", firstString);
SendClientMessage(playerid, color, finalStringLINE1);
format(finalStringLINE2, sizeof(finalStringLINE2), "... %s", secondString);
SendClientMessage(playerid, color, finalStringLINE2);
return true;
}
else
{
SendClientMessage(playerid, color, string);
return true;
}
}