SA-MP Forums Archive
Larger chat - 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: Larger chat (/showthread.php?tid=415080)



Larger chat - Sniper99 - 11.02.2013

does anybody know how do a larger chat? (script)

Like this:
James Lucas says:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa-
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


Re: Larger chat - jueix - 11.02.2013

Quote:
Originally Posted by Sniper99
Посмотреть сообщение
does anybody know how do a larger chat? (script)

Like this:
James Lucas says:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa-
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
I don't think its possible, the max chat size i think is 256 characters.


Re: Larger chat - 2KY - 11.02.2013

Quote:
Originally Posted by jueix
Посмотреть сообщение
I don't think its possible, the max chat size i think is 256 characters.
It's actually 128, and I've seen it done, I assume they just split the huge string into parts and send them that way.


Re: Larger chat - niCe - 11.02.2013

You could script it with SendPlayerClientMessageToAll + colour embedding.


AW: Re: Larger chat - NetKiel - 11.02.2013

Quote:
Originally Posted by 2KY
Посмотреть сообщение
It's actually 128, and I've seen it done, I assume they just split the huge string into parts and send them that way.
Chat"size" is 144 characters


Re: Larger chat - zgintasz - 11.02.2013

how is it related with 0.3x scripting?


Re: Larger chat - leong124 - 12.02.2013

Quote:
Originally Posted by niCe
Посмотреть сообщение
You could script it with SendPlayerClientMessageToAll + colour embedding.
User can still input 128 characters. Unless they input twice, there's no way to do that, but what's the point of making a long chat than splitting the sentence into 2 parts then?


Re: AW: Re: Larger chat - Basssiiie - 12.02.2013

Quote:
Originally Posted by NetKiel
Посмотреть сообщение
Chat"size" is 144 characters
User input is only 128, but chat size is indeed 144. This is just 24 (max length of user name) + 2 (": ", the colon and the space) + 128 (text input) = 144.


Re: Larger chat - Jochemd - 12.02.2013

MAX_PLAYER_NAME is 24, but the max allowed name is 20 as far as I know.

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
User input is only 128, but chat size is indeed 144. This is just 24 (max length of user name) + 2 (": ", the colon and the space) + 128 (text input) = 144.
24 + 2 + 128 = 154


Re: Larger chat - MP2 - 12.02.2013

Max chat input is 128. Max SendClientMessage is 144.

I joined with a 20-character name and inputted 127 'W' characters (widest character) and then put a . at the end, and the . showed. That's at least 150. 154 if you had a 24-char name.

But, we digress. Nobody has answered his actual question.

Quote:
Originally Posted by Sniper99
Посмотреть сообщение
does anybody know how do a larger chat? (script)

Like this:
James Lucas says:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa-
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
As I previously said, a clientmessage can be 144 characters. In the default SA-MP player messages, the 73rd character is put on a new line (irrespective of name length).

There are various methods for doing this. strmid etc.


Re: Larger chat - Joe Staff - 12.02.2013

You guys aren't including some of the typical color changing texts that some scripts have called for, which often times reduces the maximum of the sent text.

Also the term OP's looking for is 'text wrapping'

pawn Code:
stock sendWrappedText(playerid,color,text[],len=sizeof text,cutoff=128)
{
    new cell;
    new tmpS[154];
    while(cell<len)
    {
        strmid(tmpS,text,cell,cell+cutoff);
        SendClientMessage(playerid,color,tmpS);
        cell+=cutoff;
    }
}
Not Tested