SA-MP Forums Archive
RP text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: RP text (/showthread.php?tid=471197)



RP text - Wizzy951 - 21.10.2013

Hi guys, I wonder how can I split the text by players in the chat if it's too long (for an ex. 10 characters per line) using strrest or somehow else. So if the player says: 0123456789ab it should print:
Код:
Player says:0123456789
Player says:ab
Instead of
Код:
Players says:01234567890ab



Re: RP text - rickisme - 21.10.2013

pawn Код:
stock chat(text[])
{
    if(strlen(text) > 64)
    {
        new strings1[65];
        strmid(strings1,text,64,128);
        strdel(text,64,128);
        format(text,66,"%s-",text);
        format(strings1,66,"-%s",strings1);
        SendClientMessageToAll(-1, text);
        SendClientMessageToAll(-1, strings1);
    }
    else SendClientMessageToAll(-1, text);
   
    return 1;
}