Skip to content

Commit

Permalink
fix: bpt_lscustom fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed May 24, 2024
1 parent 04bac93 commit c2ec432
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions server-data/resources/[bpt_addons]/bpt_lscustom/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function GetAction(data)
_label = TranslateCap('neon') ..
' - <span style="color:cornflowerblue;">' .. TranslateCap('installed') .. '</span>'
else
price = math.floor(vehiclePrice * v.price / 100)
local price = math.floor(vehiclePrice * v.price / 100)
_label = TranslateCap('neon') .. ' - <span style="color:green;">$' .. price .. ' </span>'
end
elements[#elements + 1] = {
Expand Down Expand Up @@ -383,7 +383,7 @@ function GetAction(data)
_label = GetLabelText(modName) .. ' - <span style="color:cornflowerblue;">' ..
TranslateCap('installed') .. '</span>'
else
price = math.floor(vehiclePrice * v.price / 100)
local price = math.floor(vehiclePrice * v.price / 100)
_label = GetLabelText(modName) .. ' - <span style="color:green;">$' .. price ..
' </span>'
end
Expand Down Expand Up @@ -411,7 +411,7 @@ function GetAction(data)
_label = GetLabelText(modName) .. ' - <span style="color:cornflowerblue;">' ..
TranslateCap('installed') .. '</span>'
else
price = math.floor(vehiclePrice * v.price / 100)
local price = math.floor(vehiclePrice * v.price / 100)
_label = GetLabelText(modName) .. ' - <span style="color:green;">$' .. price ..
' </span>'
end
Expand Down Expand Up @@ -538,7 +538,7 @@ end

-- Blips
CreateThread(function()
for k, v in pairs(Config.Zones) do
for _, v in pairs(Config.Zones) do
local blip = AddBlipForCoord(v.Pos.x, v.Pos.y, v.Pos.z)

SetBlipSprite(blip, 72)
Expand All @@ -554,16 +554,14 @@ end)
-- Activate menu when player is inside marker
CreateThread(function()
while true do
local Sleep = 1500
local Near = false
local playerPed = PlayerPedId()

if IsPedInAnyVehicle(playerPed, false) then
local coords = GetEntityCoords(playerPed)
local currentZone, zone, lastZone

if (ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic') or not Config.IsMechanicJobOnly then
for k, v in pairs(Config.Zones) do
for _, v in pairs(Config.Zones) do
if #(coords - v.Pos) < Config.DrawDistance then
Near = true
Sleep = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AddEventHandler('esx:playerDropped', function(src)
src = tostring(src)
local playersCount = #GetPlayers()
if Customs[src] then
for k, v in pairs(Customs[src]) do
for _, v in pairs(Customs[src]) do
local entity = NetworkGetEntityFromNetworkId(v.netId)
if DoesEntityExist(entity) then
if playersCount > 0 then
Expand Down Expand Up @@ -104,7 +104,7 @@ RegisterNetEvent('bpt_lscustom:refreshOwnedVehicle', function(vehicleProps, netI
end
else
print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(
xPlayer.source))
xPlayer.source))
end
end
end)
Expand Down

0 comments on commit c2ec432

Please sign in to comment.