Raising the letter count limit
#3

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

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);
}
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.
Reply


Messages In This Thread
Raising the letter count limit - by Homerman - 21.07.2011, 22:11
Re: Raising the letter count limit - by MadeMan - 21.07.2011, 22:26
Re: Raising the letter count limit - by [HiC]TheKiller - 21.07.2011, 22:29
Re: Raising the letter count limit - by Homerman - 21.07.2011, 22:33
Re: Raising the letter count limit - by Homerman - 21.07.2011, 22:53
Re: Raising the letter count limit - by MadeMan - 22.07.2011, 09:32
Re: Raising the letter count limit - by Adil - 22.07.2011, 15:57
Re: Raising the letter count limit - by Homerman - 23.07.2011, 12:56
Re: Raising the letter count limit - by Lvcnr - 23.07.2011, 14:22

Forum Jump:


Users browsing this thread: 8 Guest(s)