From e1f6220c70331e2cef6a7107c31318cea2be44e8 Mon Sep 17 00:00:00 2001 From: TheImp1000 Date: Mon, 20 May 2024 12:29:33 +0100 Subject: [PATCH] fix(ox_lib/marker): Make example standalone --- pages/ox_lib/Modules/Marker/Client.mdx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pages/ox_lib/Modules/Marker/Client.mdx b/pages/ox_lib/Modules/Marker/Client.mdx index a6eb18307f..3c24ad6694 100644 --- a/pages/ox_lib/Modules/Marker/Client.mdx +++ b/pages/ox_lib/Modules/Marker/Client.mdx @@ -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, }) @@ -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