Jump to content

Gates


mint3d

Recommended Posts

------------------------------------------------------------------------------ 
local dwnzgate = createColSphere ( -1572, 662, 7, 6 ) 
local dwnogate = createObject ( 980, -1572.19, 658.79, 6.8, 0, 269, 270 ) 
  
function pd_dgate_enter ( thePlayer ) 
    local team = getPlayerTeam(thePlayer) 
    if not team then return end 
    if getTeamName(team) == "CZ.-" or getTeamName(team) == "BG.-" then 
        local x,y,z = getObjectRotation ( dwnogate ) 
        moveObject ( dwnogate, 3000, -1572.19, 658.79, 6.8, 0, -1+(360-y), 0 ) 
    end 
end 
  
function pd_dgate_exit ( thePlayer ) 
    if getPlayerTeam ( thePlayer ) then 
        local x,y,z = getObjectRotation ( dwnogate ) 
        moveObject ( dwnogate, 2000, -1572.19, 658.79, 6.8, 0, -90+(360-y), 0 ) 
    end 
end 
addEventHandler ( "onColShapeHit", dwnzgate, pd_dgate_enter ) 
addEventHandler ( "onColShapeLeave", dwnzgate, pd_dgate_exit ) 
------------------------------------------------------------------------------ 

i want to make it for castilos group system teams how?

Link to comment
------------------------------------------------------------------------------ 
local dwnzgate = createColSphere ( -1572, 662, 7, 6 ) 
local dwnogate = createObject ( 980, -1572.19, 658.79, 6.8, 0, 269, 270 ) 
  
function pd_dgate_enter ( thePlayer ) 
    if getElementByType ( thePlayer ) == 'player' then 
    local group = exports [ "gang_system" ]:getPlayerGang ( thePlayer ) 
    if not group then return end 
    if group == "CZ.-" or group == "BG.-" then 
        local x,y,z = getObjectRotation ( dwnogate ) 
        moveObject ( dwnogate, 3000, -1572.19, 658.79, 6.8, 0, -1+(360-y), 0 ) 
        end 
    end 
end 
  
function pd_dgate_exit ( thePlayer ) 
    if getElementByType ( thePlayer ) == 'player' then 
    if not exports [ "gang_system" ]:getPlayerGang ( thePlayer ) then return end 
        local x,y,z = getObjectRotation ( dwnogate ) 
        moveObject ( dwnogate, 2000, -1572.19, 658.79, 6.8, 0, -90+(360-y), 0 ) 
    end 
end 
addEventHandler ( "onColShapeHit", dwnzgate, pd_dgate_enter ) 
addEventHandler ( "onColShapeLeave", dwnzgate, pd_dgate_exit ) 
------------------------------------------------------------------------------ 

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