View Single Post
Old 30/11/2012, 11:14 AM   #10
cosbraa
Big Clucker
 
Join Date: Apr 2012
Posts: 126
Reputation: 19
Default Re: Making the chat and the message split?

pawn Code:
CMD:me(playerid, params[])
{
    new line1[128], line2[128], string[128];
    if(strlen(params) > 120)
    {
        // "* 012345678901234567890123 " = 27 characters. 128 - 27 = 101
        strsplit(params, line1, line2, 101);
        format(string, sizeof(string), "* %s %s", GetNameEx(playerid), line1);
        NearByMessage(playerid, COLOUR, string);
        format(string, sizeof(string), "* %s ((%s)), line2, GetNameEx(playerid));
        NearByMessage(playerid, COLOUR, string);
    }
    else
    {
        format(string, sizeof(string), "
* %s %s", GetNameEx(playerid), params);
        NearByMessage(playerid, COLOUR, string);
    }
    return 1;
}
that kind of way. on ipod, may have mistakes.
cosbraa is offline   Reply With Quote