Jump to content

Execute Command through script?


Recommended Posts

function activateDebug3() 
    if (isDebugViewActive()) then 
        executeCommandHandler("debugscript","0") 
    else 
        executeCommandHandler("debugscript","3") 
    end 
end 
addCommandHandler("db3",activateDebug3) 

Link to comment

Sorry, actually you can't do it. This function only executes command that is inside the lua file, not the hardcoded ones, so the only way you could make a shortcut for 'debugscript 3' is to bind it to a key in MTA console, if even that is possible.

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