Jump to content

بوابه تعمل بزر تاب


Recommended Posts

السلام عليكم

هذا كود بوابه السجن

ابيها تعمل بزر تاب حق الشرطه بس

الي يقدر يساعدني يكلمني سكايب

medo.fathy205

local Object = createObject ( 5422, 1467.5, -1663.9000244141, 33.299999237061, 0, 0, 0 ) 
local Marker = createMarker ( 1467.6999511719, -1664, 31.299999237061, "cylinder", 5, 0, 0, 0, 0 ) 
  
function OpenObject ( player ) 
    if ( isElementWithinMarker ( player, Marker ) ) then 
        moveObject ( Object, 1500, 1467.5, -1663.9000244141, 37.299999237061 ) 
    else 
        moveObject ( Object, 1500, 1467.5, -1663.9000244141, 37.299999237061 ) 
    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

تفضل

local Object = createObject ( 5422, 1467.5, -1663.9000244141, 33.299999237061, 0, 0, 0 ) 
local Marker = createMarker ( 1467.6999511719, -1664, 31.299999237061, "cylinder", 5, 0, 0, 0, 0 ) 
  
function OpenObject ( player ) 
    if ( isElementWithinMarker ( player, Marker ) ) then 
                 if getTeamName( getPlayerTeam(player) ) == "Police" then 
        moveObject ( Object, 1500, 1467.5, -1663.9000244141, 37.299999237061 ) 
    else 
        moveObject ( Object, 1500, 1467.5, -1663.9000244141, 37.299999237061 ) 
    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...