razvan2299 Posted January 30, 2014 Posted January 30, 2014 Hi, as the title says,I would like to create a moving gate with a password. Can I please get ste-by-step tutorial?
Karuzo Posted January 30, 2014 Posted January 30, 2014 gate = createObject(980, x, y, z, rx, ry, rz)-- 980 is the object number, x the x-coordinate, y-coordinate, z-coordinate, rx,ry,rz are the rotations. function gateOpen() moveObject( gate, 2000, x, y, z )-- gate is the object which we want to move, 2000 is the time the gate needs to move to the new coordinates. x,y,z are the coordinates where the gate should move . end addCommandHandler("gateo", gateOpen)--Command /gateo to open the gate function gateClose() moveObject( gate, 2000, x, y, z )--again the same thing just type here the x,y,z from above. so the gate gets where it was at the beginning. end addCommandHandler("gatec", gateClose)--Command /gatec to close the gate
razvan2299 Posted January 30, 2014 Author Posted January 30, 2014 What should I do with this code?I only have a .map file.
Karuzo Posted January 30, 2014 Posted January 30, 2014 You should read this : https://wiki.multitheftauto.com/wiki/Sc ... troduction That would help you much.
razvan2299 Posted January 30, 2014 Author Posted January 30, 2014 Well, can you just tell me what to do?Please?
Gallardo9944 Posted January 30, 2014 Posted January 30, 2014 Well, can you just tell me what to do?Please? Sure. Study it. Scripting subforum is not a request box.
Karuzo Posted January 30, 2014 Posted January 30, 2014 I've wrote that down. Those are the rotations of the objects. mostly you just need to change the Z rotation.
razvan2299 Posted January 30, 2014 Author Posted January 30, 2014 Okey...I completed everything ... Now what should I write in the .xml file?
Karuzo Posted January 30, 2014 Posted January 30, 2014 https://wiki.multitheftauto.com/wiki/Meta.xml Just read it.
xeon17 Posted January 30, 2014 Posted January 30, 2014 (edited) Okey...I completed everything ... Now what should I write in the .xml file? "Author" version="1.0" type="script" /> Edited January 30, 2014 by Guest
xeon17 Posted January 30, 2014 Posted January 30, 2014 Okey...I completed everything ... Now what should I write in the .xml file? "Author" version="1.0" type="script" />
xeon17 Posted January 30, 2014 Posted January 30, 2014 EufraT, you forgot it to close^^. I copyed it bad from my computer , but fixed after 10 seconds..
razvan2299 Posted January 30, 2014 Author Posted January 30, 2014 Ok I did everything and now it looks like this http://postimg.org/image/lroupl8s7/ COORDS CLOSED: X:-301.2998046875 Y:1493.5 Z:77.099998474121 RZ:97.998046875 AND OPENED: X:-301.2998046875 Y:1493.5 Z:78.0999984741211
Karuzo Posted January 30, 2014 Posted January 30, 2014 Your rotation is wrong. Just try some other rotation.
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