Bean666 Posted July 7, 2016 Share Posted July 7, 2016 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
فاّرس Posted July 7, 2016 Share Posted July 7, 2016 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
Walid Posted July 7, 2016 Share Posted July 7, 2016 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
Captain Cody Posted July 7, 2016 Share Posted July 7, 2016 Or another thing for i,v in pairs(getElementByID("marker")) do local blip = createBlipAttachedTo(v, 41) end Exactly what you asked for in the first post. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now