i want make this gate for Admins and Mods , but aren't work what the function please !
door = createObject (969, -693.33526611328, 961.4765625, 11.519198417664, 0, 0, 90)
myMarker = createMarker ( -692.35626220703, 966.18280029297, 12.28093624115, 'cylinder', 6.0, 0, 0, 0, 0 )
function markerHit (player)
local theAccount = getPlayerAccount(player)
if theAccount then
local accountName = getAccountName(theAccount)
if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin, Moderator" ) ) then
moveObject ( door, 1500, -693.3701171875, 970.4765625, 11.519198417664 )
end
end
end
addEventHandler ( "onMarkerHit", myMarker, markerHit )
function markerLeave (player)
local theAccount = getPlayerAccount(player)
if theAccount then
local accountName = getAccountName(theAccount)
if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin, Moderator" ) ) then
moveObject ( door, 1500, -693.33526611328, 961.4765625, 11.519198417664 )
end
end
end
addEventHandler ( "onMarkerLeave", myMarker, markerLeave )