Jump to content

attach a marker to an object?


Recommended Posts

Posted

you can use this

blip createBlipAttachedTo ( element elementToAttachTo, [int icon=0, int size=2, int r=255, int g=0, int b=0,  
int a=255, int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] ) 

Posted
you can use this
blip createBlipAttachedTo ( element elementToAttachTo, [int icon=0, int size=2, int r=255, int g=0, int b=0,  
int a=255, int ordering=0, float visibleDistance=99999.0, visibleTo = getRootElement()] ) 

This function is for attaching blips, not for elements, for example the object and the marker.

For moving you can use "moveObject" and for attaching the attach function you wrote.

//From phone

Posted

Using moveObject would be so bad.

You should better update the position using a render and setting the position of that marker in that render.

Posted

i think you looking for this'

local x, y, z = getElementPosition(source) 
    local marker = createMarker(x, y, z, "ring", 2, 204, 0, 0) 
    attachElements(marker, source) 

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