Jump to content

original mta door


triplesnake

Recommended Posts

addCommandHandler is just a way of executing a function, it's not the function to open it.

addCommandHandler("open", 
function (thePlayer, cmd, gateID) 
     setGarageOpen(tonumber(gateID), true) 
     outputChatBox("You have opened the garage ".. tostring(gateID),thePlayer,0,255,0) 
end) 

Then you can do /open

Edited by Guest
Link to comment

so to make it close too i make it like this

addCommandHandler("open",

function (thePlayer, cmd, gateID)

setGarageOpen(tonumber(gateID), true)

outputChatBox("You have opened the garage ".. tostring(gateID),thePlayer,0,255,0)

end)

addCommandHandler("close",

function (thePlayer, cmd, gateID)

setGarageOpen(tonumber(gateID), false)

outputChatBox("You have closed the garage ".. tostring(gateID),thePlayer,0,255,0)

end)

right?

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