function createAllCols()
medicsphere1 = createColSphere(-2601.9345703125, 590.7041015625, 14.453125, 10)
medicsphere2 = createColSphere(-2566.6650390625, 578.083984375, 14.459202766418, 15)
addEventHandler("onColShapeHit", medicsphere1, openMedicGate1)
end
addEventHandler("onResourceStart", getRootElement(), createAllCols)
--addEventHandler("onColShapeHit", medicsphere2, openMedicGate2)
local openFence = false
local openFence2 = false
function openMedicGate1 (element, dimension)
outputChatBox("HIT HIT HIT")
local account = getPlayerAccount(element)
--if (getElementType(element) == "player") and (getAccountData(account, "job") == "medic") then (you don't need it this is just for me to check whether the player is a medic!)
if (openFence == false) then
moveObject(elec1, 5000, -2602.3181152344, 594.03961181641, 13.603122711182, 0, 0, 0)
openFence = true
outputChatBox("SHOULD BE OPEN")
if (openFence == true) then
setTimer(moveObject, 9000, 1, elec1, 7000, -2602.3239746094, 585.18743896484, 13.603122711182, 0, 0, 0)
setTimer(setOpenFenceToFalse, 16000, 1)
end
end
--end
end
function setOpenFenceToFalse()
openFence = false
end