Jump to content

something like this?


Bean666

Recommended Posts

is some thing like this possible? i tried once and seems not to work or maybe i just did smth wrong , i want to attach blips on things that has the Element ID "marker"

any tips/help?

local FishingSpot = createMarker(494.214, -1925.360, -0.550, 'cylinder', 5.0, 0, 0, 255, 150) 
setElementID(FishingSpot, "marker") 
local FishingSpot2 = createMarker(469, -1941.166015625, -0, 'cylinder', 5.0, 0, 0, 255, 150) 
setElementID(FishingSpot2, "marker") 
local id = getElementByID("marker") 
local blips = createBlipAttachedTo(id, 41) 

Link to comment

As far as i know you can't do that, but also you can do it like this :

local FishingSpot = createMarker(494.214, -1925.360, -0.550, 'cylinder', 5.0, 0, 0, 255, 150) 
local FishingSpot2 = createMarker(469, -1941.166015625, -0, 'cylinder', 5.0, 0, 0, 255, 150) 
  
t = { FishingSpot, FishingSpot2 } 
  
for i = 1,#t do 
    setElementID( t[i], "marker"..i) 
    id = getElementByID("marker"..i) 
    blips = createBlipAttachedTo(id, 41) 
end 
Link to comment

try to use this

local FishingSpot = createMarker(494.214, -1925.360, -0.550, 'cylinder', 5.0, 0, 0, 255, 150) 
local FishingSpot2 = createMarker(469, -1941.166015625, -0, 'cylinder', 5.0, 0, 0, 255, 150) 
local markers = {FishingSpot,FishingSpot2} 
local blips = {} 
  
for i=1,#markers do 
   setElementID(markers[i], "marker".. i)    
   blips[markers[i]] = createBlipAttachedTo(markers[i], 41) 
end 

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