Jump to content

Help [OMG] Object Moving Generator


cleverdog32

Recommended Posts

Posted

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

Too much delicious...

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

Looking for tutorials or information? check out: www.simpleask.co.uk

  • 2 weeks later...
Posted

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. 

Balkan DayZ [www.balkan-dayz.info]

195.154.97.9:22003

  • 1 month later...

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