diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index 476e4f99..7da04a24 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -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) diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index e268ec80..439ebf10 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -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, @@ -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 diff --git a/[core]/esx_context/main.lua b/[core]/esx_context/main.lua index ebf6a253..16a6b446 100644 --- a/[core]/esx_context/main.lua +++ b/[core]/esx_context/main.lua @@ -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, } diff --git a/[core]/esx_multicharacter/client/main.lua b/[core]/esx_multicharacter/client/main.lua index 556ccfe3..5ef90719 100644 --- a/[core]/esx_multicharacter/client/main.lua +++ b/[core]/esx_multicharacter/client/main.lua @@ -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() @@ -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 }, @@ -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") } @@ -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 @@ -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 } @@ -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 @@ -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) @@ -359,6 +359,6 @@ if ESX.GetConfig().Multichar then canRelog = true end) end - end) + end,false) end end diff --git a/[core]/esx_skin/client/main.lua b/[core]/esx_skin/client/main.lua index 83485da9..2d239398 100644 --- a/[core]/esx_skin/client/main.lua +++ b/[core]/esx_skin/client/main.lua @@ -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 @@ -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 = {}