The_Taker Posted June 26, 2011 Share Posted June 26, 2011 (edited) anyone knows how to get Doherty Garage open or i have to edit the .dff file to open that part? thanks in andvance Edited June 26, 2011 by Guest Link to comment
Oz. Posted June 26, 2011 Share Posted June 26, 2011 It should be possible to manipulate the garage doors, they are separate from the rest of the garage model, and in fact separate from each other, IDs 11360 (left door) and 11416 (right door). A DFF/COL edit shouldn't be necessary, unless you're unlucky with invisible walls or something and a COL edit is then necessary. There might be a community script to allow garage door to open, or perhaps there's a function to trigger certain default doors, someone else will know that I guess. You could then spawn object ID 11389 - the 'interior' of the garage - and position it correctly. You ought to be able to find the detailing objects yourself using Map Editor. Link to comment
Castillo Posted June 26, 2011 Share Posted June 26, 2011 https://wiki.multitheftauto.com/wiki/Garage And use setGarageOpen(ID, true) to open them. Link to comment
[DemoN] Posted June 26, 2011 Share Posted June 26, 2011 an example from wiki: GARAGE_ID = 25 -- create a collision shape and attach event handlers to it when the resource starts addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function (resource) local garageCube = createColCube(1337, 194, 28, 6, 10, 4) addEventHandler("onColShapeHit", garageCube, onGarageCubeHit) addEventHandler("onColShapeLeave", garageCube, onGarageCubeLeave) end) -- open the door when someone enters the garage's collision shape function onGarageCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then -- check to make sure the door is closed if (not isGarageOpen(GARAGE_ID)) then -- open the door setGarageOpen(GARAGE_ID, true) end end end -- close the door when someone leaves the garage's collision shape function onGarageCubeLeave(leaveElement, matchingDimension) if (getElementType(leaveElement) == "player") then -- check to make sure the door is open if (isGarageOpen(GARAGE_ID)) then -- close the door setGarageOpen(GARAGE_ID, false) end end end and you can find Garage ID's: https://wiki.multitheftauto.com/wiki/Garage Link to comment
will briggs Posted June 26, 2011 Share Posted June 26, 2011 There is a list of doors that can be opened at https://wiki.multitheftauto.com/wiki/Garage Link to comment
Oz. Posted June 26, 2011 Share Posted June 26, 2011 Didn't either of you read Castillo's post...? Link to comment
The_Taker Posted June 26, 2011 Author Share Posted June 26, 2011 is this right? becuase i did this and the gurage dont open.. and i found this script that opens the garage but the download link dont work viewtopic.php?f=108&t=26032&p=354601#p354601 this is the code here GARAGE_ID = 22 addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function (resource) local garageCube = createColCube(11389) addEventHandler("onColShapeHit", garageCube, onGarageCubeHit) addEventHandler("onColShapeLeave", garageCube, onGarageCubeLeave) end) -- open the door when someone enters the garage's collision shape function onGarageCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then -- check to make sure the door is closed if (not isGarageOpen(22)) then -- open the door setGarageOpen(22, true) end end end -- close the door when someone leaves the garage's collision shape function onGarageCubeLeave(leaveElement, matchingDimension) if (getElementType(leaveElement) == "player") then -- check to make sure the door is open if (isGarageOpen(22)) then -- close the door setGarageOpen(22, false) end end end Link to comment
Castillo Posted June 26, 2011 Share Posted June 26, 2011 Your createColCube arguments are wrong..... Take a look in here: https://wiki.multitheftauto.com/wiki/CreateColCube Link to comment
[DemoN] Posted June 26, 2011 Share Posted June 26, 2011 and please use .. so we can understand your script... GARAGE_ID = 22 addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function (resource) local garageCube = createColCube(11389) addEventHandler("onColShapeHit", garageCube, onGarageCubeHit) addEventHandler("onColShapeLeave", garageCube, onGarageCubeLeave) end) -- open the door when someone enters the garage's collision shape function onGarageCubeHit(hitElement, matchingDimension) if (getElementType(hitElement) == "player") then -- check to make sure the door is closed if (not isGarageOpen(22)) then -- open the door setGarageOpen(22, true) end end end -- close the door when someone leaves the garage's collision shape function onGarageCubeLeave(leaveElement, matchingDimension) if (getElementType(leaveElement) == "player") then -- check to make sure the door is open if (isGarageOpen(22)) then -- close the door setGarageOpen(22, false) end end end Link to comment
The_Taker Posted June 26, 2011 Author Share Posted June 26, 2011 Your createColCube arguments are wrong.....Take a look in here: https://wiki.multitheftauto.com/wiki/CreateColCube so wut i do with the cube is it the doors of teh garage or wut i do? its confuseing Link to comment
JR10 Posted June 26, 2011 Share Posted June 26, 2011 A cube is a collision cuboid you can use it with addEventHandler('onColShapeHit', colShape, onMyColShapeHit) and you should use it to open the garage when a player approches it. example: (another shape function) local myColShape = createColTube(0, 0, 0, 10, 10) addEventHandler('onColShapeHit', myColShape, function(hitElement, dim) if getElementType(hitElement) == 'player' then outputChatBox(getElementName(hitElement)..' has entered the col shape') end end ) Link to comment
The_Taker Posted June 26, 2011 Author Share Posted June 26, 2011 ok so is this the coords of the door? createColTube(0, 0, 0, 10, 10) Link to comment
JR10 Posted June 26, 2011 Share Posted June 26, 2011 no this is just an example you should replace 0, 0, 0 with the your coordinates also you might want to lower 10 a bit. 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