mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 00:01:22 +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)
|
||||
+2
-2
@@ -6,7 +6,7 @@ QBCore.Commands.IgnoreList = { -- Ignore old perm levels while keeping backwards
|
||||
}
|
||||
|
||||
CreateThread(function() -- Add ace to node for perm checking
|
||||
for k,v in pairs(QBConfig.Server.Permissions) do
|
||||
for _, v in pairs(QBConfig.Server.Permissions) do
|
||||
ExecuteCommand(('add_ace qbcore.%s %s allow'):format(v, v))
|
||||
end
|
||||
end)
|
||||
@@ -224,7 +224,7 @@ QBCore.Commands.Add('ooc', 'OOC Chat Message', {}, false, function(source, args)
|
||||
local Players = QBCore.Functions.GetPlayers()
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
local playerCoords = GetEntityCoords(GetPlayerPed(source))
|
||||
for k, v in pairs(Players) do
|
||||
for _, v in pairs(Players) do
|
||||
if v == source then
|
||||
TriggerClientEvent('chat:addMessage', v, {
|
||||
color = { 0, 0, 255},
|
||||
|
||||
+1
-1
@@ -42,4 +42,4 @@ end
|
||||
|
||||
function QBCore.ShowSuccess(resource, msg)
|
||||
print('\x1b[32m['..resource..':LOG]\x1b[0m '..msg)
|
||||
end
|
||||
end
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
-- Event Handler
|
||||
|
||||
AddEventHandler('chatMessage', function(source, _, message)
|
||||
AddEventHandler('chatMessage', function(_, _, message)
|
||||
if string.sub(message, 1, 1) == '/' then
|
||||
CancelEvent()
|
||||
return
|
||||
@@ -57,13 +57,13 @@ local function onPlayerConnecting(name, setKickReason, deferrals)
|
||||
deferrals.update(string.format(Lang:t('info.join_server'), name))
|
||||
|
||||
if not license then
|
||||
deferrals.done(Lang:t('error.no_valid_license'))
|
||||
deferrals.done(Lang:t('error.no_valid_license'))
|
||||
elseif isBanned then
|
||||
deferrals.done(Reason)
|
||||
elseif isLicenseAlreadyInUse and QBCore.Config.Server.CheckDuplicateLicense then
|
||||
deferrals.done(Lang:t('error.duplicate_license'))
|
||||
elseif isWhitelist and not whitelisted then
|
||||
deferrals.done(Lang:t('error.not_whitelisted'))
|
||||
deferrals.done(Lang:t('error.not_whitelisted'))
|
||||
else
|
||||
deferrals.done()
|
||||
if QBCore.Config.Server.UseConnectQueue then
|
||||
@@ -209,15 +209,15 @@ QBCore.Functions.CreateCallback('QBCore:HasItem', function(source, cb, items, am
|
||||
if not Player then return cb(false) end
|
||||
if type(items) == 'table' then
|
||||
local count = 0
|
||||
local finalcount = 0
|
||||
local finalcount
|
||||
for k, v in pairs(items) do
|
||||
if type(k) == 'string' then
|
||||
finalcount = 0
|
||||
for i, _ in pairs(items) do finalcount += 1 end
|
||||
for _, _ in pairs(items) do finalcount = finalcount + 1 end
|
||||
local item = Player.Functions.GetItemByName(k)
|
||||
if item then
|
||||
if item.amount >= v then
|
||||
count += 1
|
||||
count = count + 1
|
||||
if count == finalcount then
|
||||
retval = true
|
||||
end
|
||||
@@ -229,13 +229,13 @@ QBCore.Functions.CreateCallback('QBCore:HasItem', function(source, cb, items, am
|
||||
if item then
|
||||
if amount then
|
||||
if item.amount >= amount then
|
||||
count += 1
|
||||
count = count + 1
|
||||
if count == finalcount then
|
||||
retval = true
|
||||
end
|
||||
end
|
||||
else
|
||||
count += 1
|
||||
count = count + 1
|
||||
if count == finalcount then
|
||||
retval = true
|
||||
end
|
||||
|
||||
@@ -63,7 +63,7 @@ end
|
||||
|
||||
function QBCore.Functions.GetPlayers()
|
||||
local sources = {}
|
||||
for k, v in pairs(QBCore.Players) do
|
||||
for k, _ in pairs(QBCore.Players) do
|
||||
sources[#sources+1] = k
|
||||
end
|
||||
return sources
|
||||
@@ -83,7 +83,7 @@ function QBCore.Functions.GetPlayersOnDuty(job)
|
||||
if Player.PlayerData.job.name == job then
|
||||
if Player.PlayerData.job.onduty then
|
||||
players[#players + 1] = src
|
||||
count += 1
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -96,7 +96,7 @@ function QBCore.Functions.GetDutyCount(job)
|
||||
for _, Player in pairs(QBCore.Players) do
|
||||
if Player.PlayerData.job.name == job then
|
||||
if Player.PlayerData.job.onduty then
|
||||
count += 1
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -137,7 +137,7 @@ end
|
||||
function QBCore.Functions.GetPlayersInBucket(bucket --[[ int ]])
|
||||
local curr_bucket_pool = {}
|
||||
if QBCore.Player_Buckets and next(QBCore.Player_Buckets) then
|
||||
for k, v in pairs(QBCore.Player_Buckets) do
|
||||
for _, v in pairs(QBCore.Player_Buckets) do
|
||||
if v.bucket == bucket then
|
||||
curr_bucket_pool[#curr_bucket_pool + 1] = v.id
|
||||
end
|
||||
@@ -152,7 +152,7 @@ end
|
||||
function QBCore.Functions.GetEntitiesInBucket(bucket --[[ int ]])
|
||||
local curr_bucket_pool = {}
|
||||
if QBCore.Entity_Buckets and next(QBCore.Entity_Buckets) then
|
||||
for k, v in pairs(QBCore.Entity_Buckets) do
|
||||
for _, v in pairs(QBCore.Entity_Buckets) do
|
||||
if v.bucket == bucket then
|
||||
curr_bucket_pool[#curr_bucket_pool + 1] = v.id
|
||||
end
|
||||
@@ -236,7 +236,7 @@ function QBCore.Functions.Kick(source, reason, setKickReason, deferrals)
|
||||
if source then
|
||||
DropPlayer(source, reason)
|
||||
end
|
||||
for i = 0, 4 do
|
||||
for _ = 0, 4 do
|
||||
while true do
|
||||
if source then
|
||||
if GetPlayerPing(source) >= 0 then
|
||||
@@ -279,7 +279,7 @@ function QBCore.Functions.RemovePermission(source, permission)
|
||||
QBCore.Commands.Refresh(src)
|
||||
end
|
||||
else
|
||||
for k,v in pairs(QBCore.Config.Server.Permissions) do
|
||||
for _, v in pairs(QBCore.Config.Server.Permissions) do
|
||||
if IsPlayerAceAllowed(src, v) then
|
||||
ExecuteCommand(('remove_principal identifier.%s qbcore.%s'):format(license, v))
|
||||
QBCore.Commands.Refresh(src)
|
||||
@@ -299,7 +299,7 @@ end
|
||||
function QBCore.Functions.GetPermission(source)
|
||||
local src = source
|
||||
local perms = {}
|
||||
for k,v in pairs (QBCore.Config.Server.Permissions) do
|
||||
for _, v in pairs (QBCore.Config.Server.Permissions) do
|
||||
if IsPlayerAceAllowed(src, v) then
|
||||
perms[v] = true
|
||||
end
|
||||
|
||||
+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()
|
||||
|
||||
+15
-15
@@ -238,9 +238,9 @@ function QBCore.Player.CreatePlayer(PlayerData)
|
||||
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] + amount
|
||||
self.Functions.UpdatePlayerData()
|
||||
if amount > 100000 then
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype], true)
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason, true)
|
||||
else
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype])
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason)
|
||||
end
|
||||
TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, amount, false)
|
||||
return true
|
||||
@@ -262,9 +262,9 @@ function QBCore.Player.CreatePlayer(PlayerData)
|
||||
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] - amount
|
||||
self.Functions.UpdatePlayerData()
|
||||
if amount > 100000 then
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype], true)
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason, true)
|
||||
else
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype])
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'RemoveMoney', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') removed, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason)
|
||||
end
|
||||
TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, amount, true)
|
||||
if moneytype == 'bank' then
|
||||
@@ -281,7 +281,7 @@ function QBCore.Player.CreatePlayer(PlayerData)
|
||||
if not self.PlayerData.money[moneytype] then return false end
|
||||
self.PlayerData.money[moneytype] = amount
|
||||
self.Functions.UpdatePlayerData()
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'SetMoney', 'green', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') set, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype])
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'SetMoney', 'green', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') set, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason)
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -351,16 +351,16 @@ function QBCore.Player.CreatePlayer(PlayerData)
|
||||
local slots = QBCore.Player.GetSlotsByItem(self.PlayerData.items, item)
|
||||
local amountToRemove = amount
|
||||
if slots then
|
||||
for _, slot in pairs(slots) do
|
||||
if self.PlayerData.items[slot].amount > amountToRemove then
|
||||
self.PlayerData.items[slot].amount = self.PlayerData.items[slot].amount - amountToRemove
|
||||
for _, _slot in pairs(slots) do
|
||||
if self.PlayerData.items[_slot].amount > amountToRemove then
|
||||
self.PlayerData.items[_slot].amount = self.PlayerData.items[_slot].amount - amountToRemove
|
||||
self.Functions.UpdatePlayerData()
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** lost item: [slot:' .. slot .. '], itemname: ' .. self.PlayerData.items[slot].name .. ', removed amount: ' .. amount .. ', new total amount: ' .. self.PlayerData.items[slot].amount)
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** lost item: [slot:' .. _slot .. '], itemname: ' .. self.PlayerData.items[_slot].name .. ', removed amount: ' .. amount .. ', new total amount: ' .. self.PlayerData.items[_slot].amount)
|
||||
return true
|
||||
elseif self.PlayerData.items[slot].amount == amountToRemove then
|
||||
self.PlayerData.items[slot] = nil
|
||||
elseif self.PlayerData.items[_slot].amount == amountToRemove then
|
||||
self.PlayerData.items[_slot] = nil
|
||||
self.Functions.UpdatePlayerData()
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** lost item: [slot:' .. slot .. '], itemname: ' .. item .. ', removed amount: ' .. amount .. ', item removed')
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'RemoveItem', 'red', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** lost item: [slot:' .. _slot .. '], itemname: ' .. item .. ', removed amount: ' .. amount .. ', item removed')
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -494,8 +494,8 @@ function QBCore.Player.DeleteCharacter(source, citizenid)
|
||||
queries[i] = {query = query:format(v.table), values = { citizenid }}
|
||||
end
|
||||
|
||||
MySQL.Async.transaction(queries, function(result)
|
||||
if result then
|
||||
MySQL.Async.transaction(queries, function(result2)
|
||||
if result2 then
|
||||
TriggerEvent('qb-log:server:CreateLog', 'joinleave', 'Character Deleted', 'red', '**' .. GetPlayerName(source) .. '** ' .. license .. ' deleted **' .. citizenid .. '**..')
|
||||
end
|
||||
end)
|
||||
@@ -577,7 +577,7 @@ function QBCore.Player.GetTotalWeight(items)
|
||||
local weight = 0
|
||||
if not items then return 0 end
|
||||
for _, item in pairs(items) do
|
||||
weight += item.weight * item.amount
|
||||
weight = weight + item.weight * item.amount
|
||||
end
|
||||
return tonumber(weight)
|
||||
end
|
||||
|
||||
+1
-1
@@ -244,7 +244,7 @@ QBShared.Items = {
|
||||
['shotgun_ammo'] = {['name'] = 'shotgun_ammo', ['label'] = 'Shotgun ammo', ['weight'] = 500, ['type'] = 'item', ['image'] = 'shotgun_ammo.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Ammo for Shotguns'},
|
||||
['mg_ammo'] = {['name'] = 'mg_ammo', ['label'] = 'MG ammo', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'mg_ammo.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Ammo for Machine Guns'},
|
||||
['snp_ammo'] = {['name'] = 'snp_ammo', ['label'] = 'Sniper ammo', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'rifle_ammo.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Ammo for Sniper Rifles'},
|
||||
['emp_ammo'] = {['name'] = 'emp_ammo', ['label'] = 'EMP Ammo', ['weight'] = 200, ['type'] = 'item', ['image'] = 'emp_ammo.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Ammo for EMP Launcher'},
|
||||
['emp_ammo'] = {['name'] = 'emp_ammo', ['label'] = 'EMP Ammo', ['weight'] = 200, ['type'] = 'item', ['image'] = 'emp_ammo.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Ammo for EMP Launcher'},
|
||||
|
||||
-- Card ITEMS
|
||||
['id_card'] = {['name'] = 'id_card', ['label'] = 'ID Card', ['weight'] = 0, ['type'] = 'item', ['image'] = 'id_card.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'A card containing all your information to identify yourself'},
|
||||
|
||||
+1
-2
@@ -31,7 +31,6 @@ end
|
||||
--- @param opts table<string, any> - Constructor opts param
|
||||
--- @return Locale
|
||||
function Locale:new(opts)
|
||||
local self = {}
|
||||
setmetatable(self, Locale)
|
||||
self.warnOnMissing = opts.warnOnMissing or true
|
||||
|
||||
@@ -135,4 +134,4 @@ function Locale:delete(phraseTarget, prefix)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -155,4 +155,4 @@ QBShared.FemaleNoGloves = {
|
||||
[157] = true,
|
||||
[161] = true,
|
||||
[165] = true
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4421,6 +4421,6 @@ QBShared.Vehicles = {
|
||||
},
|
||||
}
|
||||
|
||||
for k,v in pairs(QBShared.Vehicles) do
|
||||
for _, v in pairs(QBShared.Vehicles) do
|
||||
QBShared.VehicleHashes[v.hash] = v
|
||||
end
|
||||
|
||||
+1
-1
@@ -145,4 +145,4 @@ QBShared.Weapons = {
|
||||
-- Animals
|
||||
[`weapon_animal`] = {['name'] = 'weapon_animal', ['label'] = 'Animal', ['ammotype'] = nil, ['damagereason'] = 'Mauled'},
|
||||
[`weapon_cougar`] = {['name'] = 'weapon_cougar', ['label'] = 'Cougar', ['ammotype'] = nil, ['damagereason'] = 'Mauled'},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user