Hyunsu_Oh Posted March 20, 2010 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
Vivalavido Posted March 20, 2010 Posted March 20, 2010 function OnPlayerChat(message, messageType) cancelEvent() outputChatBox("[Player] ".. getPlayerName(source) .. " : " .. message) end
Gamesnert Posted March 22, 2010 Posted March 22, 2010 Why is cancel event required? If you cancel the onPlayerChat event, the original message won't appear. Otherwise you'll get something like: Gamesnert: Hello worldGamesnert: Hello world See the Cancel Effect part on the onPlayerChat page on the wiki.
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