Jump to content

Gates doesn't open


Wei

Recommended Posts

Posted

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 ) 

Diet with russian vodka, lose 3 days in one week !

Posted

Check the colshape position, it mayn't be the position you think it is.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Check the colshape position, it mayn't be the position you think it is.

how can i know the colshape position ? isn't that circle around the position that i chosed ?

Diet with russian vodka, lose 3 days in one week !

Posted
  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 ) 

Posted

change col obj size to something smaller

col = createColSphere (959, 198, 35, 10 ) --change pos

=>

col = createColSphere (959, 198, 35, 1.5 ) --change pos

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