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