Skip to content

Commit

Permalink
reverted text ui removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Sqrl34 committed Aug 12, 2024
1 parent 6542a5a commit f497582
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/menus/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ end
menu.onClose = function()
inMenu = false
stopDragCam()
if not lib.callback.await('customs:server:adminMenuOpened') then
lib.showTextUI('Press [E] to tune your car', {
icon = 'fa-solid fa-car',
position = 'left-center',
})
end
if QBCore then
TriggerServerEvent("customs:server:saveVehicleProps")
end
Expand Down
9 changes: 9 additions & 0 deletions server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ lib.callback.register('customs:server:repair', function(source, bodyHealth)
return removeMoney(source, price)
end)

lib.callback.register('customs:server:adminMenuOpened', function(source)
if currentAdmins[source] then
if currentAdmins[source].admin then
return true
end
end
return false
end)

local function IsVehicleOwned(plate)
local result = MySQL.scalar.await('SELECT 1 from player_vehicles WHERE plate = ?', {plate})
if result then
Expand Down

0 comments on commit f497582

Please sign in to comment.