Jump to content

Marker can't be moved?


DrifteR

Recommended Posts

Posted

hi again,

i have the code created with Omg project and i modified it a little bit , but it doesn't work

SERVER Side 
-- DDC OMG generated script: 
  
function omgInit() 
  light1 = createMarker(-2270.2705078125,2340.3305664063,9.8359212875366,"checkpoint",2,255,0,250,150) 
  omgMovelight1(1) 
end 
  
function omgMovelight1(point) 
  if point == 1 then 
    moveObject(light1,5000,-2270.0649414063,2287.4482421875,9.8359212875366,0,0,0) 
    setTimer(omgMovelight1,5000 + 0, 1, 2) 
  elseif point == 2 then 
    moveObject(light1,5000,-2255.2316894531,2286.6237792969,9.8359212875366,0,0,0) 
    setTimer(omgMovelight1,5000 + 0, 1, 3) 
  elseif point == 3 then 
    moveObject(light1,5000,-2254.3627929688,2336.8427734375,9.8359212875366,0,0,0) 
    setTimer(omgMovelight1,5000 + 0, 1, 4) 
  elseif point == 4 then 
    moveObject(light1,5000,-2270.2705078125,2340.3305664063,9.8359212875366,0,0,0) 
    setTimer(omgMovelight1,5000 + 0, 1, 1) 
  end 
end 
  
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), omgInit) 
  

please help :|

Posted

what have you modified?

are you getting errors?

was generated one working?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

oh right. marker is not an object. moveObject not moveElement.

You can make small object, set its alpha to 0, attach marker to element, then move that object.

edit:

but i'm worried that marker events may be not working propely after doing this

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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