Jump to content

setElementData in different dimensions


JeViCo

Recommended Posts

  • Moderators

Element data isn't bound to dimensions, unless you control it clientside without sync it.

 

A better solution would be:

setElementData(element, "key" .. "_dimension:" .. dimension, value)
setElementData(element, "key" .. "_dim:" .. dimension, value)

 

 

Or:

local markerContainer = createElement("markerContainer")

local marker1 = createMaker(...)
setElementDimension(marker1, 0)
setElementParent(marker1, markerContainer)
setElementData(marker1, "key", "345456")

local marker2 = createMaker(...)
setElementDimension(marker2, 1)
setElementParent(marker2, markerContainer)
setElementData(marker2, "key", "cgghgj")

-------------------------------------------------------------------------
addEventHandler("onMarkerHit", markerContainer, function (hitElement, matchingDimension) if matchingDimension then end 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...