1LoL1 Posted August 11, 2015 Share Posted August 11, 2015 Hi anyone can help me with this code? addEventHandler("onPlayerChat", root, function (msg,msgt) if (msgt == 0) then msg = string.gsub(msg, "#%x%x%x%x%x%x", "") output(getPlayerName(source):..": "..msg.."", "LocalChat") elseif (cmd == idk) then msg = string.gsub(msg, "#%x%x%x%x%x%x", "") output(getPlayerName(source).." "..msg.."", "RadioChat") elseif (cmd == idk) then msg = string.gsub(msg, "#%x%x%x%x%x%x", "") output(getPlayerName(source)..": "..msg.."", "GlobalChat") end end ) LocalChat = Work RadioChat = Not Work GlobalChat = Not Work My command is /GlobalChat and /RadioChat and this i have on bindKey GlobalChat = X RadioChat = Z Can anyone fixed this? please Link to comment
KariiiM Posted August 11, 2015 Share Posted August 11, 2015 localChat worked because you defined the arguments "msg and msgt" of localChat Link to comment
GTX Posted August 11, 2015 Share Posted August 11, 2015 Message type 0: Default chat Message type 1: Action message Message type 2: Team chat https://wiki.multitheftauto.com/wiki/OnPlayerChat 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