21.07.2011, 22:29
Do you mean that the word is getting cut off on the end and half of it is going to the next line? Do this
This code will cause it to cut off after the word. There is a issue if the person types grjioji9urejogjoirjoieerjoijoirejoigrjiergjoigrejo jeegrrgorojrjijrigo without any spaces though but that should be easy to fix.
pawn Код:
SendCustomPlayerMessage(playerid, color, text[])
{
if(strlen(text) > 112)
{
new text1[112],
text2[112],
pos = strfind(text," "false,102)
string[224];
strmid(text1, text, 0, pos);
strmid(text2, text, pos, strlen(text));
format(string, sizeof(string), "%s...", text1);
SendClientMessage(playerid, color, string);
format(string, sizeof(string), "...%s", text2);
SendClientMessage(playerid, color, string);
}
else SendClientMessage(playerid, color, text);
}