Jump to content

[help]Gate


youpit

Recommended Posts

Hello,y am newbie in scripting and I have a little problem with my script gate voila infact the gate does not move and I would put a command to open the gate here is a how to

Here is my sript can you tell me my mistake?

Thanks To all poster , my mistake is resolved

Edited by Guest
Link to comment

Here is a script with command /open to open the gates:

function createTheGate ()
 
        myGate = createObject ( 988, -1973.7736816406, 293.73452758789, 35.114318847656, 0, 0, 0 )
 
end
 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate )
 
 
 
 
 
function openMyGate ( )
 
moveObject ( myGate, 3000, -1973.7736816406, 293.73452758789, 29.902069091797 )
 
setTimer ( movingMyGateBack, 5000, 1 )
 
end
 
addCommandHandler("open",openMyGate)
 
 
 
function movingMyGateBack ()
 
moveObject ( myGate, 4000, -1973.7736816406, 293.73452758789, 35.114318847656 )
 
end

addCommandHandler("open",openMyGate)

- You can change OPEN to what you want (it's a command)

P.S. Don't forget to change the cordinates!

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