Jump to content

map icon on map object


Recommended Posts

hello,

i'd like to know how to add a map icon on an object?

i have a moving object and i'd like to add a map icon on it so we can see where it is on the map anytime,

this is what i tried and not working

function omg_tour()

tour = createObject(13607, 238, -1836.2998046875, 13.60000038147, 0, 0, 3.25)

tour = createBlipAttachedTo ( omgMovetour, 0, 2, 100, 0, 0, 255, 0, 99999.0, getRootElement())

omgMovetour(1)

end

or do i have to do something in the .map file?

Link to comment

That function which you have showed is invalid. There are not any events etc.

This one is valid:

  
function omg_tour() 
tour = createObject(13607, 238, -1836.2998046875, 13.60000038147, 0, 0, 3.25) 
createBlipAttachedTo ( tour, 0, 2, 100, 0, 0, 255, 0, 99999.0, getRootElement()) 
end 
addEventHandler("onResourceStart",root,omg_tour) 
  

and I don't understand what is this:

omgMovetour(1) 

if you want make moving object then just use

moveObject 

function.

I don't know too if this is client or server side script.

If this is client side then you don't need to add getRootElement() at the end of createBlipAttachedTo function.

and you have to change then onResourceStart to onClientResourceStart.

Link to comment

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