Lestat Posted July 13, 2015 Share Posted July 13, 2015 https://wiki.multitheftauto.com/wiki/OnConsole "Note: The event will not be triggered if the message can be processed by an existing command handler" function inputConsole ( text ) if ( getElementType ( source ) == "player" ) then --Typed by a Player outputChatBox("Player C: "..text, getRootElement()) else --Typed by the Server Console outputChatBox("Server C: "..text, getRootElement()) end end addEventHandler ( "onConsole", getRootElement(), inputConsole ) When I first created this code it worked flawlessly, the event only triggered for non-handled(non-existent) commands. But after sometime (refreshing resources, restarting the server etc), now the events triggers even for handled commands. Is it a bug? or am I missing something? Or maybe I imagined it and it triggered for handled commands since the start. 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