Jump to content

Gates doesn't open


Wei

Recommended Posts

When i come to the gate they doesn't open!

   gate1 = createObject ( 987, 175.19999694824, 1094.9000244141, 16, 0, 0, 90 ) 
   col = createColCircle ( 987, 175.19999694824, 1094.9000244141, 10 ) 
   peder = createBlip ( 987, 175.19999694824, 1094.9000244141, 43 ) 
  
function opengates(thePlayer) 
if getElementModel( thePlayer ) == 217 then 
       moveObject (gate1, 5000, 180.19999694824, 1094.9000244141, 16 ) 
end 
end 
addEventHandler( "onColShapeHit", col, opengates ) 
  
function closegates(thePlayer) 
if getElementModel( thePlayer ) == 217 then 
       moveObject (gate1, 5000, 175.19999694824, 1094.9000244141, 16 ) 
end 
end 
addEventHandler( "onColShapeLeave", col, closegates ) 

Link to comment
  gate1 = createObject ( 987, 959, 198, 35, 0, 0, 90 ) --change 
  col = createColSphere (959, 198, 35, 10 ) --change pos  
  peder = createBlip ( 987, 175.19999694824, 1094.9000244141, 43 )  
  
function opengates(thePlayer) 
local id = getElementModel ( thePlayer ) 
if id == 217 then 
       moveObject (gate1, 959, 198, 35, 16 ) --change  
end 
end 
addEventHandler( "onColShapeHit", col, opengates ) 
  
function closegates(thePlayer) 
if id == 217 then 
       moveObject (gate1, 959, 198, 35, 16 ) --change 
end 
end 
addEventHandler( "onColShapeLeave", col, closegates ) 

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