make new line when text is to long?
#5

This is just something I done, I think that the overflow string will appear BEFORE the actual text like so:

BMUK: awsome
BMUK: I love sa-mp and I think that it is freaking

.. :/

You can work off this as its a basic example

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(strlen(text) > 50)
    {
        new overflow[59];
       
        strmid(overflow,text,50,strlen(text));
       
        strdel(text, 50,strlen(text));
       
        new string[80], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));

        format(string, sizeof(string), "%s: %s", name, overflow);
        SendPlayerMessageToAll(playerid,string);   
    }


   
    return 1;
}
Reply


Messages In This Thread
make new line when text is to long? - by iJumbo - 08.11.2010, 14:42
Re: make new line when text is to long? - by Kwarde - 08.11.2010, 15:17
Re: make new line when text is to long? - by Scenario - 08.11.2010, 15:23
Re: make new line when text is to long? - by Jaxson - 08.11.2010, 18:36
Re: make new line when text is to long? - by BMUK - 08.11.2010, 20:12
Re: make new line when text is to long? - by MestreKiller - 21.12.2010, 20:24

Forum Jump:


Users browsing this thread: 1 Guest(s)