mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 02:01:33 +00:00
Fix linting issues
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user