Skip to content

Commit

Permalink
✏️ Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gellipapa committed Jun 16, 2024
1 parent f0eb42b commit f69a16e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [core]/es_extended/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AddEventHandler("esx:playerLoaded", function(xPlayer, _, skin)
local timer = GetGameTimer()
while not HaveAllStreamingRequestsCompleted(ESX.PlayerData.ped) and (GetGameTimer() - timer) < 2000 do
Wait(0)
end
end

if Config.EnablePVP then
SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
Expand Down
5 changes: 3 additions & 2 deletions [core]/es_extended/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function loadESXPlayer(identifier, playerId, isNew)
job, grade = "unemployed", "0"
end

jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade]
local jobObject, gradeObject = ESX.Jobs[job], ESX.Jobs[job].grades[grade]

userData.job = {
id = jobObject.id,
Expand Down Expand Up @@ -509,7 +509,8 @@ if not Config.OxInventory then
if xPlayer.hasWeapon(itemName) then
local _, weapon = xPlayer.getWeapon(itemName)
local _, weaponObject = ESX.GetWeapon(itemName)
local components, pickupLabel = ESX.Table.Clone(weapon.components)
local pickupLabel = ""
local components = ESX.Table.Clone(weapon.components)
xPlayer.removeWeapon(itemName)

if weaponObject.ammo and weapon.ammo > 0 then
Expand Down
4 changes: 2 additions & 2 deletions [core]/esx_context/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function Post(fn, ...)
end

function Open(position, eles, onSelect, onClose, canClose)
local canClose = canClose == nil and true or canClose
local canCloseMenu = canClose == nil and true or canClose
activeMenu = {
position = position,
eles = eles,
canClose = canClose,
canClose = canCloseMenu,
onSelect = onSelect,
onClose = onClose,
}
Expand Down
30 changes: 15 additions & 15 deletions [core]/esx_multicharacter/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if ESX.GetConfig().Multichar then
end)

local canRelog, cam, spawned = true, nil, nil
local Characters = {}
local Characters , hidePlayers = {} , false

RegisterNetEvent("esx_multicharacter:SetupCharacters")
AddEventHandler("esx_multicharacter:SetupCharacters", function()
Expand Down Expand Up @@ -147,7 +147,7 @@ if ESX.GetConfig().Multichar then
})
end

function CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, value)
function CharacterDeleteConfirmation(characters, slots, SelectedCharacter, value)
local elements = {
{ title = TranslateCap("char_delete_confirmation"), icon = "fa-solid fa-users", description = TranslateCap("char_delete_confirmation_description"), unselectable = true },
{ title = TranslateCap("char_delete"), icon = "fa-solid fa-xmark", description = TranslateCap("char_delete_yes_description"), action = "delete", value = value },
Expand All @@ -160,17 +160,17 @@ if ESX.GetConfig().Multichar then
TriggerServerEvent("esx_multicharacter:DeleteCharacter", Action.value)
spawned = false
elseif Action.action == "return" then
CharacterOptions(Characters, slots, SelectedCharacter)
CharacterOptions(characters, slots, SelectedCharacter)
end
end, nil, false)
end

function CharacterOptions(Characters, slots, SelectedCharacter)
function CharacterOptions(characters, slots, SelectedCharacter)
local elements = {
{ title = TranslateCap("character", Characters[SelectedCharacter.value].firstname .. " " .. Characters[SelectedCharacter.value].lastname), icon = "fa-regular fa-user", unselectable = true },
{ title = TranslateCap("character", characters[SelectedCharacter.value].firstname .. " " .. Characters[SelectedCharacter.value].lastname), icon = "fa-regular fa-user", unselectable = true },
{ title = TranslateCap("return"), unselectable = false, icon = "fa-solid fa-arrow-left", description = TranslateCap("return_description"), action = "return" },
}
if not Characters[SelectedCharacter.value].disabled then
if not characters[SelectedCharacter.value].disabled then
elements[3] = { title = TranslateCap("char_play"), description = TranslateCap("char_play_description"), icon = "fa-solid fa-play", action = "play", value = SelectedCharacter.value }
else
elements[3] = { title = TranslateCap("char_disabled"), value = SelectedCharacter.value, icon = "fa-solid fa-xmark", description = TranslateCap("char_disabled_description") }
Expand All @@ -186,17 +186,17 @@ if ESX.GetConfig().Multichar then
ESX.CloseContext()
TriggerServerEvent("esx_multicharacter:CharacterChosen", Action.value, false)
elseif Action.action == "delete" then
CharacterDeleteConfirmation(Characters, slots, SelectedCharacter, Action.value)
CharacterDeleteConfirmation(characters, slots, SelectedCharacter, Action.value)
elseif Action.action == "return" then
SelectCharacterMenu(Characters, slots)
SelectCharacterMenu(characters, slots)
end
end, nil, false)
end

function SelectCharacterMenu(Characters, slots)
local Character = next(Characters)
function SelectCharacterMenu(characters, slots)
local Character = next(characters)
local elements = { { title = TranslateCap("select_char"), icon = "fa-solid fa-users", description = TranslateCap("select_char_description"), unselectable = true } }
for k, v in pairs(Characters) do
for k, v in pairs(characters) do
if not v.model and v.skin then
if v.skin.model then
v.model = v.skin.model
Expand All @@ -210,7 +210,7 @@ if ESX.GetConfig().Multichar then
SetupCharacter(Character)
end
local label = v.firstname .. " " .. v.lastname
if Characters[k].disabled then
if characters[k].disabled then
elements[#elements + 1] = { title = label, icon = "fa-regular fa-user", value = v.id }
else
elements[#elements + 1] = { title = label, icon = "fa-regular fa-user", value = v.id }
Expand All @@ -225,7 +225,7 @@ if ESX.GetConfig().Multichar then
ESX.CloseContext()
local GetSlot = function()
for i = 1, slots do
if not Characters[i] then
if not characters[i] then
return i
end
end
Expand All @@ -240,7 +240,7 @@ if ESX.GetConfig().Multichar then
action = "closeui",
})
else
CharacterOptions(Characters, slots, SelectedCharacter)
CharacterOptions(characters, slots, SelectedCharacter)
SetupCharacter(SelectedCharacter.value)
local playerPed = PlayerPedId()
SetPedAoBlobRendering(playerPed, true)
Expand Down Expand Up @@ -359,6 +359,6 @@ if ESX.GetConfig().Multichar then
canRelog = true
end)
end
end)
end,false)
end
end
4 changes: 2 additions & 2 deletions [core]/esx_skin/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function OpenMenu(submitCb, cancelCb, restrict)
cancelCb(data, menu)
end
end, function(data, menu)
local skin, components, maxVals
local skin, maxVals

TriggerEvent("skinchanger:getSkin", function(getSkin)
skin = getSkin
Expand All @@ -105,7 +105,7 @@ function OpenMenu(submitCb, cancelCb, restrict)

-- Update max values
TriggerEvent("skinchanger:getData", function(comp, max)
components, maxVals = comp, max
maxVals = max
end)

local newData = {}
Expand Down

0 comments on commit f69a16e

Please sign in to comment.