_Marco_ Posted January 30, 2021 Posted January 30, 2021 Hi, I wrote this but it does not work. Where is the problem? I want this function to follow a few commands function Test() outputChatBox("Ok") end addCommandHandler( {"Check", "Checkk", "checkkk"} )
SpecT Posted January 30, 2021 Posted January 30, 2021 (edited) You can't use the addCommandHandler like that. You can either do it like this (server side ONLY!): addEventHandler("onPlayerCommand", root, function(cmd) if (cmd == "Check" or cmd == "Checkk" or cmd == "checkkk") then outputChatBox("Okay") end end) or like this: function testFunc() outputChatBox("Ok") end addCommandHandler( "Check", testFunc) addCommandHandler( "Checkk", testFunc) addCommandHandler( "checkkk", testFunc) Edited January 30, 2021 by SpecT 1
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