Hi, i made another script, is a gate at LSPD i want that when an admin get close to the gate this will open but the gate move to other site please help me:)
LSgate2 = createObject ( 976, 1545.0999755859, -1630.5, 12.39999961853, 0, 0, 90)
col = createColRectangle(1542.9000244141, -1636.9000244141, 10.60000038147, 20)
addEventHandler ( "onColShapeHit", col,
function(hitElement)
if (getElementType (hitElement) == "player") then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(hitElement)), aclGetGroup ( "Admin" ) ) then
moveObject (LSgate2, 2500, 1545, -1623.5, 12.39999961853, 0, 0, 90) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent.
end
end
end)
addEventHandler ( "onColShapeLeave", col,
function(hitElement)
if (getElementType (hitElement) == "player") then
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(hitElement)), aclGetGroup ( "Admin" ) ) then
moveObject (LSgate2, 2500,1545.0999755859, -1623.5, 12.39999961853, 0, 0, 90) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent.
end
end
end)