Jump to content

البوابه


Mando

Recommended Posts

السلام عليكم انا ماندو مبرمج مبتدا

بلعب فى سيرفر رسب و ركبت مود العصابات بتاع كستليو عشان العقرب مش بيتشغل عليه الاحتل

المهم حبيت ابرمج البوابه بتاعت المقرات تفتح للقروب بس

و البوابه اشتغلت بس مش بتفتح مش عارف ليه :oops:

المهم شوفو الكود

gate = createObject(980, 2127.099609375, 2848.599609375, 12.60000038147, 0, 0, 0 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position. 
gatecol = createColCircle (2127.099609375,2848.599609375, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. 
  
function openagates ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" ) then 
        local group = getElementData(player,"Group") 
setElementData(player,"Group",groupname  or "" ) 
    if ( groupName == "Mando")then 
            moveObject ( gate, 2000, 2127.1000976563, 2848.6000976563, 16.89999961853 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. 
        else 
 outputChatBox ( "Sorry You Must Be In Group [F.S] Leader Hobe", thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function 
  
function closeagates(thePlayer) 
        if ( getElementType ( thePlayer ) == "player" ) then 
        local group = getElementData(player,"Group") 
setElementData(player,"Group",groupname or "") 
if ( groupName == "Mando" )then 
            moveObject ( gate, 2000, 2127.099609375, 2848.599609375, 12.60000038147 ) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close. 
        end 
    end 
end 
addEventHandler ( "onColShapeLeave", gatecol, closeagates ) --Event Handler to trigger the function 
  

رابط مود القروبات

https://community.multitheftauto.com/in ... ls&id=1514

ياريت تظبطهولى ض5

Edited by Guest
Link to comment

-- لم يتم التجربة

gate = createObject(980, 2127.099609375, 2848.599609375, 12.60000038147, 0, 0, 0 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position. 
gatecol = createColCircle (2127.099609375,2848.599609375, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. 
  
function openagates ( player ) 
    if getElementType(player) == "player" then 
        local theTeam = getPlayerTeam(player) 
        if ( theTeam ) and ( theTeam == getTeamFromName("TeamName") ) then 
            moveObject ( gate, 2000, 2127.1000976563, 2848.6000976563, 16.89999961853 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. 
        else 
 outputChatBox ( "Sorry You Must Be In Group [F.S] Leader Hobe", thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function 
  
function closeagates(player) 
    if getElementType(player) == "player" then 
       local theTeam = getPlayerTeam(player) 
        if ( theTeam ) and ( theTeam == getTeamFromName("TeamName") ) then 
            moveObject ( gate, 2000, 2127.099609375, 2848.599609375, 12.60000038147 ) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close. 
        end 
    end 
end 
addEventHandler ( "onColShapeLeave", gatecol, closeagates ) --Event Handler to trigger the function 

Link to comment

لم يتم التجربة ..

gate = createObject(980, 2127.099609375, 2848.599609375, 12.60000038147, 0, 0, 0 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position. 
gatecol = createColCircle (2127.099609375,2848.599609375, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. 
  
function openagates ( thePlayer ) 
    if ( getElementType ( thePlayer ) == "player" ) then 
        local group = exports [ "gang_system" ]:getPlayerGang ( thePlayer ) 
        if ( group == "Mando")then 
            moveObject ( gate, 2000, 2127.1000976563, 2848.6000976563, 16.89999961853 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. 
        else 
            outputChatBox ( "Sorry You Must Be In Group [F.S] Leader Hobe", thePlayer ) 
        end 
    end 
end 
addEventHandler ( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function 
  
function closeagates(thePlayer) 
        if ( getElementType ( thePlayer ) == "player" ) then 
        local group = exports [ "gang_system" ]:getPlayerGang ( thePlayer ) 
        if ( group == "Mando")then 
            moveObject ( gate, 2000, 2127.099609375, 2848.599609375, 12.60000038147 ) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close. 
        end 
    end 
end 
addEventHandler ( "onColShapeLeave", gatecol, closeagates ) --Event Handler to trigger the function 
  

سيرفر ..

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...