Making the chat and the message split?
#4

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


Messages In This Thread
Making the chat and the message split? - by JaKe Elite - 29.11.2012, 08:41
Re: Making the chat and the message split? - by Boooth - 29.11.2012, 08:48
Re: Making the chat and the message split? - by JaKe Elite - 29.11.2012, 08:49
Re: Making the chat and the message split? - by GiamPy. - 29.11.2012, 11:39
Re: Making the chat and the message split? - by [MM]RoXoR[FS] - 29.11.2012, 11:46
Re: Making the chat and the message split? - by JaKe Elite - 30.11.2012, 00:03
Re: Making the chat and the message split? - by JaKe Elite - 30.11.2012, 09:25
Re: Making the chat and the message split? - by cosbraa - 30.11.2012, 09:46
Re: Making the chat and the message split? - by JaKe Elite - 30.11.2012, 09:49
Re: Making the chat and the message split? - by cosbraa - 30.11.2012, 10:14

Forum Jump:


Users browsing this thread: 3 Guest(s)