Jump to content

addCommandHandler IF statement inside


kuwalda

Recommended Posts

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

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...