XxCozzaxX Posted April 1, 2010 Share Posted April 1, 2010 Hi, i have an object i used to use as a lift (object that moves) in samp. This is the object: <object name="delux object" posX="-2464.9296875" posY="1522.9167480459" posZ="6.1990437507629" rotX="0.0000" rotY="0.0000" rotZ="0.0000" model="3114" /> How can i make it so that if you go onto the f1 menu and click lift or type /lift into chat it will move it to here: X: -2464.9296875 Y: 1522.9167480469 Z:27.570457458496 And if you do /lift or click lift again it moves it back to its default place. Is this possible? and if it is, can someone make it for me? Link to comment
dzek (varez) Posted April 1, 2010 Share Posted April 1, 2010 its possible, but hey, "xX" -es, you want us to make whole server for you? one refresh, and 3 topics from you both.. remove it from map file myObj = createObject(3114, -2464.9296875, 1522.9167480459, 6.1990437507629) function liftMyObj() moveObject(myObj, 7000, -2464.9296875, 1522.9167480469, 27.570457458496) end addCommandHandler("lift", liftMyObj) Link to comment
XxCozzaxX Posted April 1, 2010 Author Share Posted April 1, 2010 I assume i put this in my GM, but where? Sorry, i only just started using mta (changed from samp) Link to comment
dzek (varez) Posted April 1, 2010 Share Posted April 1, 2010 omg, dont bump the post after SEVENTEEN MINUTES! wiki.multitheftauto.com read, there is everything.. Link to comment
robhol Posted April 1, 2010 Share Posted April 1, 2010 Please try and have a little patience, won't you? As I'm sure you've noticed, this isn't the largest community on the net, you can't really expect a reply time like on certain other forums. Also, what you need here is either a command handler (addCommandHandler) or creating a GUI (which you should probably wait just a little with). The rest is fairly simple, using moveObject. To get the object, you can use getElementByID (ID is in the map file and is NOT the model ID) or simply move it from the map file and create it in the script. (createObject) Just so you know, the reason I'm not spoon-feeding you any of this, is that this info is already available on the wiki, which you'll probably need to learn to use anyway. Sooner rather than later, hm? The wiki contains information on a lot of different scripting subjects - and of course, a complete reference of scripting functions and how to use them. https://wiki.multitheftauto.com/wiki/Main_Page 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