Jump to content

طلب كود جعل البوابه في السجن تفتح عند الضغط علي تاب


Recommended Posts

local Object = createObject ( ID, x, y, z, rx, ry, rz ) 
local Marker = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) 
  
function OpenObject ( player ) 
    if ( isElementWithinMarker ( player, Marker ) ) then 
                moveObject ( Object, 1500, moveX, moveY, moveZ ) 
            else 
                moveObject ( Object, 1500, x, y, z ) 
            end 
        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...