Chat to next line.
#1

Код:
SendCustomPlayerMessage(playerid, color, text[]);
{
    if(strlen(text) > 84)
    {
        new tekst1[85],
            tekst2[85];
            
        strmid(tekst2, text, 84, 168);
        strmid(tekst1, text, 0, 84);
                
        format(string, 168, "%s...", tekst1);
        SendClientMessage(playerid, color, string);
        
        format(string, 168, "...%s", tekst2);
        SendClientMessage(playerid, color, string);
    }
    else SendClientMessage(playerid, color, text);
}
Don't know why, but it is not working. No errors or warnings, it's just not working.
Someone maybe can help?
Reply
#2

What do you mean it is not working? What is the output? Have you tried debugging? I haven't got enough information to help you out.
Reply
#3

That actually looks like it would work just fine... are you sure you're checking it with a message being sent through this function?
Reply
#4

Aren't you supposed to use SendPlayerMessageToAll rather than SendClientMessage?
Reply
#5

The long text is not going over the next line Ingame, it stays on the one line.
And when someone write something, then everybody see the text, what he writes. It doesn't matter, how far the other player is, he saws it.
And...the "_" is between IC name when write somethin in IC channel, like "Arnold_Asher", but it should't be there.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)