Jump to content

البوابه


Recommended Posts

تفضل .

AllowedGroups القروب الي تريده يفتح له البوابة حط اسمه في

  
local AllowedGroups = {"Console","Admin"}; 
local x,y,z = -720.03876, 971.34381 ,12.13281 
local time = 800 
local Gate = createObject(980, x,y,z, 0, 0,90) 
local MarkerBeb = createMarker(x,y,z-1, "cylinder", 10, 0, 0, 0, 0) 
  
function isPlayerInAllowedGroups(player) 
    if not isGuestAccount(getPlayerAccount(player)) then 
        for k,v in ipairs ( AllowedGroups ) do 
            if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then 
                return true 
            end 
        end 
    end 
end 
  
function MoveGate(player) 
    if getElementType(player) == "player" then 
        if isPlayerInAllowedGroups( player ) then 
        moveObject(Gate, time, -720.03876, 971.34381+4 ,12.13281) 
        else 
        end 
    end 
end 
addEventHandler("onMarkerHit", MarkerBeb, MoveGate) 
  
function MoveBack(player) 
    if getElementType(player) == "player" then 
        if isPlayerInAllowedGroups( player ) then 
        moveObject(Gate, time, -720.03876, 971.34381 ,12.13281) 
        end 
    end 
end 
addEventHandler("onMarkerLeave", MarkerBeb, MoveBack) 
  

Link to comment

تفضل .

AllowedGroups القروب الي تريده يفتح له البوابة حط اسمه في

  
local AllowedGroups = {"Console","Admin"}; 
local x,y,z = -720.03876, 971.34381 ,12.13281 
local time = 800 
local Gate = createObject(980, x,y,z, 0, 0,90) 
local MarkerBeb = createMarker(x,y,z-1, "cylinder", 10, 0, 0, 0, 0) 
  
function isPlayerInAllowedGroups(player) 
    if not isGuestAccount(getPlayerAccount(player)) then 
        for k,v in ipairs ( AllowedGroups ) do 
            if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then 
                return true 
            end 
        end 
    end 
end 
  
function MoveGate(player) 
    if getElementType(player) == "player" then 
        if isPlayerInAllowedGroups( player ) then 
        moveObject(Gate, time, -720.03876, 971.34381+4 ,12.13281) 
        else 
        end 
    end 
end 
addEventHandler("onMarkerHit", MarkerBeb, MoveGate) 
  
function MoveBack(player) 
    if getElementType(player) == "player" then 
        if isPlayerInAllowedGroups( player ) then 
        moveObject(Gate, time, -720.03876, 971.34381 ,12.13281) 
        end 
    end 
end 
addEventHandler("onMarkerLeave", MarkerBeb, MoveBack) 
  

تسلم ايدك

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