Hai all.
Ok so, iv been making a chat with "Channels".
These "channels" use a flags system; Each chat Tab has flags ( These can be anything ), and every time a message is typed the code matches flags from that message to flags from a chat, and if it can find a chat with matching Flags it will print the message in the said chat. Everything is working, apart from one niggling little problem. I want to be able to add the chat flags ( Which are IN the message. So a Message might look like this: "[f=ThisIsAFlag][f=TeamChat] MGinshe: <Message>" ( NOTE, the flags syntax is removed before it gets to the print stage )) BEFORE the message leaves the client? Im wondering, is there a function that the wiki has kindly not shown me? ( Yes, i have searched. And i have another way of doing it, but its not the greatest way Lag-Wise )
Im sure that was hard to understand ( Due to my shitty explaining, lol ). I hope someone can help =)
P.S. I didn't put this in the "Newbie Questions" section, as i personally don't think its a Newbie Question..
..MGinshe..
The easiest way would be ditching the whole say thing and only using it for general chat and for alternative chats use datastream.
[QUOTE=iRzilla;16879842]Get out.
Use usermessage's instead.[/QUOTE]
It all depends. If a string is too long, usermessages will throw up a "message is too big" error. It really doesn't matter which you use. :P
[QUOTE=Unrealomega;16880196]It all depends. If a string is too long, usermessages will throw up a "message is too big" error. It really doesn't matter which you use. :P[/QUOTE]
It does matter, people are using fucking datastream for everything (examples might follow, eg:
executing a function on the client - wohoo lets use datastream,
etc...)
It's 10000 times easier to use usermessages, and I bet that the chatted string won't hit the limit.
Thx guys. Iv got the problem pretty much sorted =)
[QUOTE=Lappyexpert;16879203]The easiest way would be ditching the whole say thing and only using it for general chat and for alternative chats use datastream.[/QUOTE]
Datastream: Extremely large strings or tables
UMsgs: Reasonably large strings + triggering events
Remember it.
Usermessages are limited to 255 bytes per message, including the tag (as far as I know). This means a limit of 255-tagsize string - a boolean counts as a byte, a short 2 bytes (I think) and a float 4 bytes.
Since the source chatbox limits you to 255 bytes per chat message anyway, usermessages would suit this just fine.
Why the server and clientside communication? Just use the goddamn clientside chat hooks >_>
[QUOTE=NotAlt;16901853]Why the server and clientside communication? Just use the goddamn clientside chat hooks >_>[/QUOTE]
Custom ranks don't work very well clientside if you aren't using usergroups...
[QUOTE=Retirsch;16901919]Custom ranks don't work very well clientside if you aren't using usergroups...[/QUOTE]
I meant for the text, send a umsg for the rank info though.
[QUOTE=Retirsch;16901919]Custom ranks don't work very well clientside if you aren't using usergroups...[/QUOTE]
Sure it does..
You barley need any usermessages at all.. I made a chat that uses "flags" for the color of the chat. It also has rank icons next to the players name in chat that uses usergroups.
The warning icon means it's an event.
The shield means they are an admin.
I have a few more icons too.
[media]http://i26.tinypic.com/2d1a05s.png[/media]
It's all done client side. The only reason I use a usermessage is for when the server wants to print to a players chat with advert messages or crap like that.
I AM using the client side Chat hooks... :P
What i was asking is weather i can modify what is getting sent to the server from the client, BEFORE it leaves the client.
Sorry, you need to Log In to post a reply to this thread.