kaos057 Posted May 23, 2012 Share Posted May 23, 2012 the server side function onChatMessage does not seem to be sending the right parameter for player/resource. When a regular message is received, the player parameter is nil. When a message is received from team, the player parameter is the team element. Is this supposed to be like this or is it a bug? Link to comment
Alpha Posted May 23, 2012 Share Posted May 23, 2012 theElement: Player element if chatbox output was done via say, teamsay or me. Resource if it was done via outputChatBox. Link to comment
kaos057 Posted May 23, 2012 Author Share Posted May 23, 2012 and source is the player element i like the way it works better than the way the wiki says its supposed to work lol Link to comment
Alpha Posted May 23, 2012 Share Posted May 23, 2012 I don't think it's bugged, never worked with it either. Not sure about it. Link to comment
kaos057 Posted May 23, 2012 Author Share Posted May 23, 2012 I'm using 1.3 I don't think its bugged either. I think the Wiki is wrong. Link to comment
Alpha Posted May 23, 2012 Share Posted May 23, 2012 Well, let's wait for someone more experienced. Link to comment
Jaysds1 Posted May 23, 2012 Share Posted May 23, 2012 try this: function onConsoleSay ( text ) if isElement(console) then ---Or if source == console then cancelEvent() outputChatBox("The best console: "..text, root, 0, 255, 0) end end addEventHandler("onChatMessage", root, onConsoleSay) I got it from this topic: viewtopic.php?f=91&t=42598&p=430495&hilit=onChatMessage#p430495 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now