Jump to content

طلب كود فتح البوابات


3nadk

Recommended Posts

اخوي معرف ابرمج ممكن تجيب لي الكود كامل
* Server Side:
local x, y, z = 0, 0, 0 -- إحداثيات البوابة 
local groupName = "اسم القروب" 
local Object = createObject ( 980, x, y, z ) 
local Marker = createMarker ( x, y, z, "cylinder", 5, 0, 0, 0, 0 ) 
  
function countPlayersInMarker ( marker ) 
    local players = 0 
    if marker and getElementType(marker) == "marker" then 
        for i,player in ipairs(getElementsByType("player")) do 
            if isElementWithinMarker(player,marker) and getElementData ( player, "Group" ) == groupName then 
                players = players + 1 
            end 
        end 
    end 
    return players 
end 
  
function MoveObject ( theElm ) 
    if ( getElementType ( theElm ) == "player" ) then 
        if ( eventName == "onMarkerHit" ) then 
            if ( getElementData ( theElm, "Group" ) == groupName ) and ( countPlayersInMarker ( Marker ) <= 1 ) then 
                moveObject ( Object, 1500, x, y, z + 4 ) 
            end 
        else 
            if ( countPlayersInMarker ( Marker ) == 0 ) then 
                moveObject ( Object, 1500, x, y, z ) 
            end 
        end 
    end 
end 
addEventHandler ( "onMarkerHit", Marker, MoveObject ) 
addEventHandler ( "onMarkerLeave", Marker, MoveObject ) 
  
addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElementWithinMarker ( source, Marker ) ) and ( countPlayersInMarker ( Marker ) == 0 ) then 
            moveObject ( Object, 1500, x, y, z ) 
        end 
    end 
) 

Link to comment
اخوي معرف ابرمج ممكن تجيب لي الكود كامل
* Server Side:
local x, y, z = 0, 0, 0 -- إحداثيات البوابة 
local groupName = "اسم القروب" 
local Object = createObject ( 980, x, y, z ) 
local Marker = createMarker ( x, y, z, "cylinder", 5, 0, 0, 0, 0 ) 
  
function countPlayersInMarker ( marker ) 
    local players = 0 
    if marker and getElementType(marker) == "marker" then 
        for i,player in ipairs(getElementsByType("player")) do 
            if isElementWithinMarker(player,marker) and getElementData ( player, "Group" ) == groupName then 
                players = players + 1 
            end 
        end 
    end 
    return players 
end 
  
function MoveObject ( theElm ) 
    if ( getElementType ( theElm ) == "player" ) then 
        if ( eventName == "onMarkerHit" ) then 
            if ( getElementData ( theElm, "Group" ) == groupName ) and ( countPlayersInMarker ( Marker ) <= 1 ) then 
                moveObject ( Object, 1500, x, y, z + 4 ) 
            end 
        else 
            if ( countPlayersInMarker ( Marker ) == 0 ) then 
                moveObject ( Object, 1500, x, y, z ) 
            end 
        end 
    end 
end 
addEventHandler ( "onMarkerHit", Marker, MoveObject ) 
addEventHandler ( "onMarkerLeave", Marker, MoveObject ) 
  
addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElementWithinMarker ( source, Marker ) ) and ( countPlayersInMarker ( Marker ) == 0 ) then 
            moveObject ( Object, 1500, x, y, z ) 
        end 
    end 
) 

ابو طيف كيف تيب رد واحد من موضوغ ثاني ؟؟؟ مثل ما انت سويت ب رد كينق :|:|:|

Link to comment

ابو طيف كيف تيب رد واحد من موضوغ ثاني ؟؟؟ مثل ما انت سويت ب رد كينق :|:|:|

QUOTE هذا اسمه اقتباس تلقاه فوق اسمه

طيب اعرف بس هو يجيب اقتباس من موضوع ثاني يقتبس الرد من موضوع ثاني !!

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