two lines
#5

There is a stock - SendSplitMessage. It splits your message in 2 lines.

Код:
stock SendSplitMessage(playerid, color, const final[])
{
    new buffer[EX_SPLITLENGTH+5];
    new len = strlen(final);
    if(len>EX_SPLITLENGTH)
    {
        new times = (len/EX_SPLITLENGTH);
        for(new i = 0; i < times+1; i++)
        {
            strdel(buffer, 0, EX_SPLITLENGTH+5);
            if(len-(i*EX_SPLITLENGTH)>EX_SPLITLENGTH)
            {
                strmid(buffer, final, EX_SPLITLENGTH*i, EX_SPLITLENGTH*(i+1));
                format(buffer, sizeof(buffer), "%s ...", buffer);
            }
            else
            {
                strmid(buffer, final, EX_SPLITLENGTH*i, len);
            }
            SendClientMessage(playerid, color, buffer);
        }
    }
    else
    {
        SendClientMessage(playerid, color, final);
    }
    return 1;
}
And you can use it like that:

Код:
format(gString, sizeof(gString), "Ai respins reportul jucatorului %s, motiv: %s", GetName(giveplayerid), reason);
SendSplitMessage(playerid, COLOR_NOB, gString);
And if you use it like
/closereport 0 Your message was deleted by an admin because of etc1 etc2 etc3 etc4 etc5 etc6

Your message will look like
Ai respins reportul jucatorului Player, motiv: Your message was deleted..
..by an admin because of etc1 etc2 etc3 etc4 etc5 etc6


Pe pawno.ro nu vrei sa intrebi? E mai usor pe .com?
Reply


Messages In This Thread
two lines - by StR_MaRy - 08.02.2017, 00:44
Re: two lines - by JesterlJoker - 08.02.2017, 05:19
Re: two lines - by StR_MaRy - 08.02.2017, 11:01
Re: two lines - by Vince - 08.02.2017, 11:29
Re: two lines - by Donboo - 08.02.2017, 11:30
Re: two lines - by GoldenLion - 08.02.2017, 11:52
Re: two lines - by StR_MaRy - 08.02.2017, 11:57
Re: two lines - by StR_MaRy - 08.02.2017, 12:11

Forum Jump:


Users browsing this thread: 3 Guest(s)