Jump to content

help me by this(moving gate)


abdalbaset

Recommended Posts

guys need help how i can make this script open for team and cloe after he is enter

function omg_lspdgate() 
  airport = createObject(980, 1550.6999511719, -1628.0999755859, 9, 0, 0, 90) 
  omgMoveairport(1) 
end 
  
function omgMoveairport(point) 
  if point == 1 then 
    moveObject(airport, 5000, 1550.6999511719, -1628.0999755859, 9, 0, 0, 0) 
    setTimer(omgMoveairport, 5000+5000, 1, 2) 
  elseif point == 2 then 
    moveObject(airport, 5000, 1551.1999511719, -1628.1999511719, 15.199999809265, 0, 0, 0) 
    setTimer(omgMoveairport, 5000+5000, 1, 3) 
  elseif point == 3 then 
    moveObject(airport, 5000, 1550.6999511719, -1628.0999755859, 9, 0, 0, 0) 
    setTimer(omgMoveairport, 5000+5000, 1, 1) 
  end 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), omg_lspdgate) 
  

Link to comment

you can change your team

  
local gate1 = createObject(980, 1551.1999511719, -1628.1999511719, 15.199999809265, 0, 0, 270 ) 
local theMarker1 = createMarker ( 1550.58228, -1628.22021, 13.38281, "cylinder", 4, 255, 255, 255, 255) 
  
  
  
function open1 (thePlayer)   
    if ( getTeamName(getPlayerTeam(thePlayer)) == "Team" ) then   -- change team  
        moveObject(gate1, 6000, 1550.6999511719, -1628.0999755859, 9, 0, 0, 0 ) 
    end 
end 
addEventHandler("onMarkerHit", theMarker1, open1 ) 
  
  
function close1 (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == "Team" ) then -- change team  
        moveObject(gate1, 6000, 1551.1999511719, -1628.1999511719, 15.199999809265, 0, 0, 0 ) 
    end 
end 
addEventHandler("onMarkerLeave", theMarker1, close1 ) 
  
  

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