Jump to content

Ayy64

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Ayy64

  1. Hi, i am using this gate script but i don't know how to allow only a group to open this gate. So can you guys please help me ? Or if you know a gate script that would open on command and it would work only for a group that i would put down could you write it below?

    col  = createColTube (-2078.1000976563, 1405, 6.1, 10, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. 
    root = getRootElement () 
      
    door = createObject ( 972, -2080.3999023438, 1409.25, 5, 0, 0, 270) -- enter the ID of the object followed by the coordinates 
                                                        -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. 
      
    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 ( "Staff" ) ) then 
            moveObject (door, 2200, -2080.3999023438, 1409.25, -1.3) -- 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 ( "Staff" ) ) then 
                 moveObject (door, 2951, -2080.3999023438, 1409.25, 5) -- 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) 
      
      
      
      
      
    

×
×
  • Create New...