Skip to content

Commit

Permalink
fix(ox_lib/marker): Make example standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
Moozdzn committed May 20, 2024
1 parent 67cc59f commit e1f6220
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pages/ox_lib/Modules/Marker/Client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ end)

### Interactive Example
```lua

local center = vec3(430.452759, -1026.108032, 27.846140)
local uiText = "Press [E] to get notified"

local point = lib.points.new({
coords = SharedConfig.Warehouse.coords,
coords = center,
distance = 20,
})

local marker = lib.marker.new({
coords = GetEntityCoords(SharedConfig.Warehouse.coords),
coords = center,
type = 1,
})

Expand All @@ -67,7 +71,8 @@ function point:nearby()
})
end
else
if lib.isTextUIOpen() then
local isOpen, currentText = lib.isTextUIOpen()
if isOpen and currentText == uiText then
lib.hideTextUI()
end
end
Expand Down

0 comments on commit e1f6220

Please sign in to comment.