Jump to content

كود باب يفتح ابيه


Recommended Posts

ما ظبت معيا شوف الي سويتو

local Object = createObject ( 980, 1319.19921875, 746.8994140625, 16 0, 0, 0 ) 
local Marker = createMarker ( 1319.2998046875, 743,13.39999961853 'cylinder', 2, 0, 0, 0, 0 ) 
  
function OpenObject ( player ) 
    if isElementWithinMarker ( player, Marker ) then 
        local accName = getAccountName ( getPlayerAccount ( player ) ) 
        if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then 
            if not Open then 
                moveObject ( Object, 1500, 1319.19921875, 746.8994140625, 10 ) 
            else 
                moveObject ( Object, 1500, 1319.19921875, 746.8994140625, 16 ) 
            end 
            Open = not Open 
        else 
            outputChatBox ( "* You must be 'Admin' !", player, 200, 0, 0, true ) 
        end 
    end 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "tab", "down", OpenObject ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerJoin", root, 
    function ( ) 
        bindKey ( source, "tab", "down", OpenObject ) 
    end 
) 

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...