kuwalda Posted June 8, 2014 Share Posted June 8, 2014 I have made command: addCommandHandler("race", testejam) Problem is, it`s activating function, which should be activated only once with this command. Like I type /race and then, I can`t type /race anymore. How can I do it? I thought something like this would work, but I got a bit confused: addCommandHandler("race", function (thePlayer, command) if (getElementData(thePlayer, "allowedToUseThisCommand") == 1) then testejam --what next? how to call this "testejam" function? end end ) Link to comment
Den. Posted June 8, 2014 Share Posted June 8, 2014 You can call this testejam function by simply doing this: testejam() --If you wish to give it arguments, for example: testejam(thePlayer) Link to comment
kuwalda Posted June 8, 2014 Author Share Posted June 8, 2014 Thanks, that`s what I was looking for! 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