Jump to content

[HELP] ACL Gate


TheLittleOG

Recommended Posts

Hello guys. I have a problem... IdK whats, wrong, but i hope some1 can help me.

All the time i get the errors.. My Code :

function

door=createObject (974, 267.70001220703,

addEvent ( "Open", true )

function Open ( pla )

if getElementType ( pla ) == "player" then

if vehicle or not vehicle then

aclGroupListACL ( aclgroup, Admin ) if --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group.

isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then

moveObject (door, 2200, 2743.29998779297, -2298, 4.3000001907349) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent.

else

return 0

end

end

end

end

addEventHandler ( "onColShapeHit", col, Open)

addEventHandler ( "Open", root, Open)

function Close ( pla )

if getElementType ( pla ) == "player" then

if vehicle or not vehicle then

aclGroupListACL ( aclgroup, Admin ) if

isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then

moveObject (door, 2951, 267.70001220703, -2298.1000976563, 4.3000001907349) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent.

else

return 0

end

end

end

end

addEventHandler ( "onColShapeLeave", col, Close )

addEventHandler ( "Close", root, Close)

Link to comment
Hello guys. I have a problem... IdK whats, wrong, but i hope some1 can help me.

All the time i get the errors.. My Code :

function

door=createObject (974, 267.70001220703,

addEvent ( "Open", true )

function Open ( pla )

if getElementType ( pla ) == "player" then

if vehicle or not vehicle then

aclGroupListACL ( aclgroup, Admin ) if --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group.

isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then

moveObject (door, 2200, 2743.29998779297, -2298, 4.3000001907349) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent.

else

return 0

end

end

end

end

addEventHandler ( "onColShapeHit", col, Open)

addEventHandler ( "Open", root, Open)

function Close ( pla )

if getElementType ( pla ) == "player" then

if vehicle or not vehicle then

aclGroupListACL ( aclgroup, Admin ) if

isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then

moveObject (door, 2951, 267.70001220703, -2298.1000976563, 4.3000001907349) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent.

else

return 0

end

end

end

end

addEventHandler ( "onColShapeLeave", col, Close )

addEventHandler ( "Close", root, Close)

Try this:

  
door = createObject (974, 267.70001220703) -- here put cordinates 
  
function Open (pla) 
local vehicle = getPedOccupiedVehicle(pla) 
if getElementType ( pla ) == "player" then 
if vehicle or not vehicle then 
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then 
moveObject (door, 2200, 2743.29998779297, -2298, 4.3000001907349) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. 
else     
outputChatBox("text", pla, 255, 255, 255, true) 
            end 
        end 
    end 
end 
addEventHandler("onColShapeHit", col, Open)  
addEventHandler("Open", root, Open) 
  
function Close ( pla ) 
local vehicle = getPedOccupiedVehicle(pla) 
if getElementType ( pla ) == "player" then 
if vehicle or not vehicle then 
if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then 
moveObject (door, 2951, 267.70001220703, -2298.1000976563, 4.3000001907349) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. 
else  
outputChatBox("text", pla, 255, 255, 255, true) 
            end 
        end 
    end 
end 
addEventHandler("onColShapeLeave", col, Close ) 
addEventHandler("Close", root, Close) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...