Looky Posted June 15, 2019 Share Posted June 15, 2019 I have a problem creating a zone in a different position and here is the code: function createZone(posX, posY, posZ, interior, dimension, id) local markerElement = createColCuboid (posX, posY, posZ, 197.5, 92, 30 ) local areasElement = createRadarArea( posX, posY, 300, 200, 255, 255, 255, 90 ) print("test2") setElementInterior(markerElement, interior or 0) setElementDimension(markerElement, dimension or 0) setElementData(markerElement, "id", id or (#zone)+1 ) setElementData(markerElement, "zones", true) --table.insert(zone, {marker = markerElement} ) table.insert(zone, {marker = markerElement} ) end addCommandHandler ( "stworzzone", function (source) local x, y, z = getElementPosition( source ) createZone(z, y+1, z+5, 0, 0) print("test") end) Problem solved addCommandHandler ( "stworzzone", function (source) local x, y, z = getElementPosition( source ) createZone(z, y+1, z+5, 0, 0) --<-- HERE Z xD print("test") end) 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