Jump to content

[HELP] Marker.


Emmanuel

Recommended Posts

When I create a marker, it works, but when I created a marker in an interior it doesn't show up, and also doesn't show any kind of error.

local yMarker = createMarker (2104.7353515625, -1806.4340820313, 12.5, "cylinder", 0.5, 255, 255, 0)

function yMarker (hitPlayer, matchingDiemension)
    if matchingDiemension and hitPlayer == localPlayer then
            outputChatBox ("Has entered the shop")
            setElementInterior ( localPlayer, 5, 372.40167236328, -132.85858154297, 1001.4921875)                
    end
end

addEventHandler ("onClientMarkerHit", root, yMarker)

local rMarker = createMarker (372.40167236328, -132.85858154297, 1001.4921875, "cylinder", 0.5, 255, 255, 0) 

The  one highlighted green, is the coordinates of the int.

 

Edited by Emmanuel
Link to comment

You made a marker, but you forgot to put the marker inside the interior :P 

When you create markers, they are the same as any other element, interior 0, dimension 0, until you set there interior/dimension, try this.

local yMarker = createMarker (2104.7353515625, -1806.4340820313, 12.5, "cylinder", 0.5, 255, 255, 0)

function yMarker (hitPlayer, matchingDiemension)
    if matchingDiemension and hitPlayer == localPlayer then
            outputChatBox ("Has entered the shop")
            setElementInterior ( localPlayer, 5, 372.40167236328, -132.85858154297, 1001.4921875)                
    end
end

addEventHandler ("onClientMarkerHit", root, yMarker)

local rMarker = createMarker (372.40167236328, -132.85858154297, 1001.4921875, "cylinder", 0.5, 255, 255, 0) 
setElementInterior ( rMarker, 5) 

Also it is important to note, if you set your players position/interior at the marker where you exit, the player will be moving between markers forever unable to move away.

  • Thanks 1
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...