cleverdog32 Posted December 28, 2014 Share Posted December 28, 2014 Hi, Last time i downloaded OMG Script for MTA SA, i know how to rotate or move the object from it's position, but i don't know how to stop it... For example: I create a container for lift, but it can't stopped just moving... Please someone help me... Link to comment
Bean666 Posted December 31, 2014 Share Posted December 31, 2014 as i know OMG doesnt really stop it's movements. Link to comment
cleverdog32 Posted January 1, 2015 Author Share Posted January 1, 2015 Really? OMG can't stop it's movement? I saw objects, that are moving and stopping in many servers! Link to comment
manve1 Posted January 1, 2015 Share Posted January 1, 2015 Really? OMG can't stop it's movement? I saw objects, that are moving and stopping in many servers! That's because people code them. If the generator doesn't have the code required, the movement won't stop. Link to comment
cleverdog32 Posted January 2, 2015 Author Share Posted January 2, 2015 OK! But, What is the code of generator? Did you know the code of generator? Link to comment
-PhoenixX- Posted January 13, 2015 Share Posted January 13, 2015 Hello , cleverdog32. I don't know if I'm late to post here , but ok.. You can set your object move to specific coordinates using command. For example you type '/movemyobject' and it moves to where do you want. BTW you create the object you want using lua , not map editor. Hope this piece of code will help you: function createTheObject () -- function for creating your object myObject = createObject ( objectmodel , x , y , z , xrotation , yrotation , zrotation) -- If you haven't rotated the object , put for xyz rotation all to 0. -- x , y , z is the position where you want to create the object end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheObject ) function moveMyObject( ) -- function for moving your object moveObject ( myObject , 2500, x , y , z ) -- 2500 is the time in miliseconds ( how fast will the object move to it's position ) end addCommandHandler("myobjectmove",moveMyObject) -- change "myobjectmove" to anything you want. for example: 'abracadabra!' function moveMyObjectBack () -- function for moving your object back moveObject ( myObject , 2500, x , y , z ) -- set xyz to original object's position. end addCommandHandler("myobjectmoveback", moveMyObjectBack) -- change "myobjectmoveback" to anything you want. Link to comment
cleverdog32 Posted February 20, 2015 Author Share Posted February 20, 2015 Thanks -PhoenixX- 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