Skip to content

Commit

Permalink
Merge pull request #188 from Moozdzn/fix(ox_lib/marker)-make-example-…
Browse files Browse the repository at this point in the history
…standalone

fix(ox_lib/marker): Make example standalone
  • Loading branch information
thelindat authored Jun 12, 2024
2 parents c20a89b + e1f6220 commit cddc4f0
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 cddc4f0

Please sign in to comment.