Author Topic: Client Team Chat  (Read 1068 times)

What is the client sided function for team chat and all it's vars?

Trace(1); is your best friend.

I'm seriously going to make a "How to use trace video" for everyone..

I don't have the arguments at the moment, but the specific functions are NMH_Type::send, TeamChat and commandToServer.

I don't have the arguments at the moment, but the specific functions are NMH_Type::send, TeamChat and commandToServer.

I think he meant when another person types in team chat, to intercept the data, which requires a package.

Use onChatMessage.
It can be used to easily edit, get, and use the message, and only has 3 variables. You don't even need to package it, or parent it!
No seriously, don't package or parent it. Seriously don't.
Here's a snippet of code:
Code: [Select]
function onChatMessage(%message, %voice, %pitch)
{
newChatHud_addLine(%message);
//dostuff here
}
Or if you want to modify the message, you can edit %message before the newChatHud_blah line.

Use onChatMessage.
It can be used to easily edit, get, and use the message, and only has 3 variables. You don't even need to package it, or parent it!
No seriously, don't package or parent it. Seriously don't.
Here's a snippet of code:
Code: [Select]
function onChatMessage(%message, %voice, %pitch)
{
newChatHud_addLine(%message);
//dostuff here
}
Or if you want to modify the message, you can edit %message before the newChatHud_blah line.

No.


Except when people make server-sided add-ons improperly and just use messageClient(cl,'',cl.name @ ": " @ %msg);

Except when people make server-sided add-ons improperly and just use messageClient(cl,'',cl.name @ ": " @ %msg);
You shouldn't need to compensate for other people's idiocy, so if it doesnt work, blame the person who forgeted with chat code.

You shouldn't need to compensate for other people's idiocy, so if it doesnt work, blame the person who forgeted with chat code.
Many of my add-ons end up getting forgeted over by other people's idiocy. They end up being incompatible with 'popular' add-ons.

Use onChatMessage.
It can be used to easily edit, get, and use the message, and only has 3 variables. You don't even need to package it, or parent it!
No seriously, don't package or parent it. Seriously don't.
Here's a snippet of code:
Code: [Select]
function onChatMessage(%message, %voice, %pitch)
{
newChatHud_addLine(%message);
//dostuff here
}
Or if you want to modify the message, you can edit %message before the newChatHud_blah line.
How is that detecting a team chat message?

It detects all chatting.
Unless of course messageClient is used, in which case there is a  function called onServerMessage.

EDIT: I know there are specific functions for each seperate chat though, i'm getting on the computer soon, i'll check it out.
« Last Edit: January 08, 2012, 05:29:59 PM by Ipquarx »

It detects all chatting.
Unless of course messageClient is used, in which case there is a  function called onServerMessage.

EDIT: I know there are specific functions for each seperate chat though, i'm getting on the computer soon, i'll check it out.
I want the specific function for team chat(client sided).

Okay, I looked it up using trace and team chat is just regular chat with different colours.
There is absolutely no specific team chat function.
use onChatMessage or you can use clientCmdChatMessage (i think that's the name of it, if i'm wrong correct me.)

Okay, I looked it up using trace and team chat is just regular chat with different colours.
There is absolutely no specific team chat function.
use onChatMessage or you can use clientCmdChatMessage (i think that's the name of it, if i'm wrong correct me.)
Is there any(client sided) way to detect team chat?