mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-31 18:28:56 +00:00
Fix linting issues
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ local function hideText()
|
||||
end
|
||||
|
||||
local function drawText(text, position)
|
||||
if not type(position) == "string" then position = "left" end
|
||||
if type(position) ~= "string" then position = "left" end
|
||||
|
||||
SendNUIMessage({
|
||||
action = 'DRAW_TEXT',
|
||||
@@ -17,7 +17,7 @@ local function drawText(text, position)
|
||||
end
|
||||
|
||||
local function changeText(text, position)
|
||||
if not type(position) == "string" then position = "left" end
|
||||
if type(position) ~= "string" then position = "left" end
|
||||
|
||||
SendNUIMessage({
|
||||
action = 'CHANGE_TEXT',
|
||||
|
||||
+2
-2
@@ -127,7 +127,7 @@ RegisterNetEvent('QBCore:Command:SpawnVehicle', function(vehName)
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
if IsPedInAnyVehicle(ped) then
|
||||
if IsPedInAnyVehicle(ped) then
|
||||
DeleteVehicle(veh)
|
||||
end
|
||||
|
||||
@@ -147,7 +147,7 @@ RegisterNetEvent('QBCore:Command:DeleteVehicle', function()
|
||||
else
|
||||
local pcoords = GetEntityCoords(ped)
|
||||
local vehicles = GetGamePool('CVehicle')
|
||||
for k, v in pairs(vehicles) do
|
||||
for _, v in pairs(vehicles) do
|
||||
if #(pcoords - GetEntityCoords(v)) <= 5.0 then
|
||||
SetEntityAsMissionEntity(v, true, true)
|
||||
DeleteVehicle(v)
|
||||
|
||||
@@ -186,7 +186,7 @@ function QBCore.Functions.GetClosestPed(coords, ignoreList)
|
||||
else
|
||||
coords = GetEntityCoords(ped)
|
||||
end
|
||||
local ignoreList = ignoreList or {}
|
||||
ignoreList = ignoreList or {}
|
||||
local peds = QBCore.Functions.GetPeds(ignoreList)
|
||||
local closestDistance = -1
|
||||
local closestPed = -1
|
||||
@@ -407,12 +407,12 @@ function QBCore.Functions.GetVehicleProperties(vehicle)
|
||||
|
||||
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
|
||||
if GetIsVehiclePrimaryColourCustom(vehicle) then
|
||||
r, g, b = GetVehicleCustomPrimaryColour(vehicle)
|
||||
local r, g, b = GetVehicleCustomPrimaryColour(vehicle)
|
||||
colorPrimary = {r, g, b}
|
||||
end
|
||||
|
||||
if GetIsVehicleSecondaryColourCustom(vehicle) then
|
||||
r, g, b = GetVehicleCustomSecondaryColour(vehicle)
|
||||
local r, g, b = GetVehicleCustomSecondaryColour(vehicle)
|
||||
colorSecondary = {r, g, b}
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ end)
|
||||
CreateThread(function()
|
||||
while true do
|
||||
if LocalPlayer.state.isLoggedIn then
|
||||
if (QBCore.PlayerData.metadata['hunger'] <= 0 or QBCore.PlayerData.metadata['thirst'] <= 0) and not QBCore.PlayerData.metadata['isdead'] then
|
||||
if (QBCore.PlayerData.metadata['hunger'] <= 0 or QBCore.PlayerData.metadata['thirst'] <= 0) and not QBCore.PlayerData.metadata['isdead'] then
|
||||
local ped = PlayerPedId()
|
||||
local currentHealth = GetEntityHealth(ped)
|
||||
local decreaseTreshold = math.random(5, 10)
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@ end)
|
||||
|
||||
-- To use this export in a script instead of manifest method
|
||||
-- Just put this line of code below at the very top of the script
|
||||
-- local QBCore = exports['qb-core']:GetCoreObject()
|
||||
-- local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
print("Hello World")
|
||||
|
||||
print(`I am a backtick string`)
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
end)
|
||||
Reference in New Issue
Block a user