triplesnake Posted August 30, 2011 Share Posted August 30, 2011 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 Link to comment
Castillo Posted August 30, 2011 Share Posted August 30, 2011 You can't move a GTA:SA Map door or whatever, they're unable to be moved/deleted. Link to comment
triplesnake Posted August 30, 2011 Author Share Posted August 30, 2011 but i saw a guy on that server making the lv desert airport hanger move Link to comment
Castillo Posted August 30, 2011 Share Posted August 30, 2011 That's a GTA garage, you can open them with setGarageOpen: https://wiki.multitheftauto.com/wiki/SetGarageOpen Garage ID's are here: https://wiki.multitheftauto.com/wiki/Garage Link to comment
triplesnake Posted August 30, 2011 Author Share Posted August 30, 2011 buti want it to open with addCommandHandler Link to comment
Castillo Posted August 30, 2011 Share Posted August 30, 2011 (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 August 30, 2011 by Guest Link to comment
triplesnake Posted August 30, 2011 Author Share Posted August 30, 2011 thank you a lot you are very helpful and so i use that code only and not the wiki one right? Link to comment
Castillo Posted August 30, 2011 Share Posted August 30, 2011 You put that in a .lua file and create it's meta.xml, and then type the command with the ID. Link to comment
triplesnake Posted August 30, 2011 Author Share Posted August 30, 2011 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
Castillo Posted August 31, 2011 Share Posted August 31, 2011 Yes, that should work. P.S: Use the LUA tags in the forum . 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