youpit Posted July 7, 2010 Share Posted July 7, 2010 (edited) 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 July 8, 2010 by Guest Link to comment
FUNExtreme Posted July 7, 2010 Share Posted July 7, 2010 Your function name in the AddEventHandler does not match the actuall function name openagates1 opena51gates Link to comment
TheRealCow Posted July 7, 2010 Share Posted July 7, 2010 thats a capy of that: http://www.forum.multitheftauto.com/viewtopic.php?f=91&t=28251&start=0 Link to comment
MaddDogg Posted July 7, 2010 Share Posted July 7, 2010 OMG, you can't just patch together some script lines without even knowing, what the script, you're making there, does and then think, you will get a decent result. Learn the scripting basics first: https://wiki.multitheftauto.com/wiki/Main_Page Link to comment
rafull6 Posted July 8, 2010 Share Posted July 8, 2010 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
youpit Posted July 8, 2010 Author Share Posted July 8, 2010 Thanks you Rafful its work Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now