kaos057 Posted May 23, 2012 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?
Alpha Posted May 23, 2012 Posted May 23, 2012 theElement: Player element if chatbox output was done via say, teamsay or me. Resource if it was done via outputChatBox. My Resources: [REL] Support System v1.0.2
kaos057 Posted May 23, 2012 Author 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
Jaysds1 Posted May 23, 2012 Posted May 23, 2012 What version are you using? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Alpha Posted May 23, 2012 Posted May 23, 2012 I don't think it's bugged, never worked with it either. Not sure about it. My Resources: [REL] Support System v1.0.2
kaos057 Posted May 23, 2012 Author Posted May 23, 2012 I'm using 1.3 I don't think its bugged either. I think the Wiki is wrong.
Alpha Posted May 23, 2012 Posted May 23, 2012 Well, let's wait for someone more experienced. My Resources: [REL] Support System v1.0.2
Jaysds1 Posted May 23, 2012 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 My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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