Skip to content

Commit

Permalink
Fix: remove some checks for lazy qbox users
Browse files Browse the repository at this point in the history
  • Loading branch information
Coffeelot committed Sep 22, 2024
1 parent b260021 commit 176ef55
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions bridge/client/qbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function getVehicleModel(vehicle)
end

function getClosestPlayer()
return QBX.Functions.GetClosestPlayer()
local coords = GetEntityCoords(cache.ped)
local playerId, _, playerCoords = lib.getClosestPlayer(coords, 50, false)
local closestDistance = playerCoords and #(playerCoords - coords) or nil
return playerId, closestDistance
end

function notify(text, type)
Expand All @@ -68,12 +71,8 @@ function notify(text, type)
return
end

if Config.OxLibNotify then
lib.notify({
title = text,
type = type,
})
else
QBX.Functions.Notify(text, type)
end
lib.notify({
title = text,
type = type,
})
end

0 comments on commit 176ef55

Please sign in to comment.