Hyunsu_Oh Posted March 20, 2010 Share Posted March 20, 2010 sorry, my bad english. function OnPlayerChat(message, messageType) outputChatBox("[Player] ".. getPlayerName(source) .. " : " .. message) end ex. ( i type text " hello" ) [chat box] [Player] myname : hello myname : hello i only want to see "[Player] myname : text" i want to delete "myname : hello" sorry my bad english Link to comment
Vivalavido Posted March 20, 2010 Share Posted March 20, 2010 function OnPlayerChat(message, messageType) cancelEvent() outputChatBox("[Player] ".. getPlayerName(source) .. " : " .. message) end Link to comment
Michael_Tuner Posted March 22, 2010 Share Posted March 22, 2010 Why is cancel event required? Link to comment
Gamesnert Posted March 22, 2010 Share Posted March 22, 2010 Michael_Tuner said: Why is cancel event required? If you cancel the onPlayerChat event, the original message won't appear. Otherwise you'll get something like: Quote Gamesnert: Hello worldGamesnert: Hello world See the Cancel Effect part on the onPlayerChat page on the wiki. 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