Jump to content

Moving gate


Recommended Posts

How can I make this gate open for players who drive vehicles?

checkGateMarker = createMarker ( 2066.49, 1578.40, 10.67, "corona", 4.5, 0, 0, 255, 0 ) 
function onPoliceShapeHit ( thePlayer, matchingDimension ) 
    if ( getElementType ( thePlayer ) == "player" ) then 
    end 
end 
addEventHandler ( "onColShapeHit", policeColShape, onPoliceShapeHit ) 
  
function createGate () 
    gatePolice = createObject (980, 2067.10, 1580.30, 12.30, 0, 0, 0 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) 
  
  
function gateCheckingTeam ( thePlayer, matchingDimension ) 
    moveObject ( gatePolice, 988, 2067.10, 1580.30, 7 ) 
end 
addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) 
  
function onLeave ( thePlayer, matchingDimension ) 
    setTimer ( movingBackPolice, 3000, 1, thePlayer ) 
end 
addEventHandler ( "onMarkerLeave", checkGateMarker, onLeave ) 
  
function movingBackPolice () 
    moveObject ( gatePolice, 3000, 2067.10, 1580.30, 12.30 ) 
end 

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