Jump to content

addCommandHandler


_Marco_

Recommended Posts

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 by SpecT
  • Thanks 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...