Jump to content

original mta door


triplesnake

Recommended Posts

Posted

i was wondering how to move an original door object i know its id and all but since its original object i dunno how to make it move if someone can help me in that i will really apreciate it

i want it to move with addcommandhandler

Posted (edited)

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
Posted

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?

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