Jump to content

gate help


[S.K]

Recommended Posts

    local gate = createObject(971, 1535, -1451, 14, 0, 0, 0.27014160156) 
    local marker = createMarker(1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0) 
      
   function moveGate(hitPlayer, matchingDimension) 
          moveObject(gate, 2000, 1535, -1451, 7) 
            setTimer(moveBack, 2000, 1) 
    end 
    addEventHandler("onMarkerHit", marker, moveGate) 
      
   function moveBack() 
       moveObject(gate, 2000, 1535.02056884766, -1451.98352050781, 14.239881515503) 
   end 

i want change this to skin example this gate only open for 217 skin

Link to comment
local gate = createObject ( 971, 1535, -1451, 14, 0, 0, 0.27014160156 ) 
local marker = createMarker ( 1535, -1450, 14, "cylinder", 6, 255, 255, 255, 0 ) 
  
function moveGate ( hitPlayer, matchingDimension ) 
    if ( getElementType ( hitPlayer ) == "player" ) and ( getElementModel ( hitPlayer ) == 217 ) then 
        moveObject ( gate, 2000, 1535, -1451, 7 ) 
        setTimer ( moveBack, 2000, 1 ) 
    end 
end 
addEventHandler ( "onMarkerHit", marker, moveGate ) 
  
function moveBack ( ) 
    moveObject ( gate, 2000, 1535.02056884766, -1451.98352050781, 14.239881515503 ) 
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...