Jump to content

Help with time and gate


xXMADEXx

Recommended Posts

How can i make it, so that when the time in the server turns to 0 that the gate moves up, and when the time turns to 6 the gate moves down?

function myGate(player) 
    gate = createObject(980, 1012.5, -902.5, 43, 0, 0, 95) 
    local gateTimer = getTime() 
    if (gateTimer == 0) then 
        moveObject (gate, 500, 96.861328, 1915.637, 30 ) 
    elseif (gateTimer == 6) then 
        moveObject (gate, 500, 1012.5, -902.5, 43 ) 
    end 
end 

Link to comment
function myGate() 
    gate = createObject(980, 1012.5, -902.5, 43, 0, 0, 95) 
    local gateTimer = getTime() 
    if (gateTimer < 6) then 
        moveObject (gate, 500, 96.861328, 1915.637, 30 ) 
    else 
        moveObject (gate, 500, 1012.5, -902.5, 43 ) 
    end 
end 
setTimer(myGate, 60000, 0) 

If you want check, you must wait 60 sec to open/close.

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