diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index b7194c7a..c59b406e 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -414,7 +414,7 @@ function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked) local dist = #(playerCoords - vector) if dist > 424 then -- Onesync infinity Range (https://docs.fivem.net/docs/scripting-reference/onesync/) local executingResource = GetInvokingResource() or "Unknown" - return print(("[^1ERROR^7] Resource ^5%s^7 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(executing_resource)) + return print(("[^1ERROR^7] Resource ^5%s^7 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(executingResource)) end CreateThread(function() @@ -583,7 +583,7 @@ function ESX.Game.GetVehicleInDirection() local playerCoords = GetEntityCoords(playerPed) local inDirection = GetOffsetFromEntityInWorldCoords(playerPed, 0.0, 5.0, 0.0) local rayHandle = StartExpensiveSynchronousShapeTestLosProbe(playerCoords, inDirection, 10, playerPed, 0) - local numRayHandle, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(rayHandle) + local _, hit, _, _, entityHit = GetShapeTestResult(rayHandle) if hit == 1 and GetEntityType(entityHit) == 2 then local entityCoords = GetEntityCoords(entityHit) @@ -638,7 +638,7 @@ function ESX.Game.GetVehicleProperties(vehicle) } if TyresIndex[numWheels] then - for tyre, idx in pairs(TyresIndex[numWheels]) do + for _, idx in pairs(TyresIndex[numWheels]) do tyreBurst[tostring(idx)] = IsVehicleTyreBurst(vehicle, idx, false) end end diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index b963e7ab..b4d85e5c 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -174,7 +174,7 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin) 'WORLD_HUMAN_PAPARAZZI' } - for i, v in pairs(scenarios) do + for _, v in pairs(scenarios) do SetScenarioTypeEnabled(v, false) end end @@ -227,7 +227,7 @@ AddEventHandler('esx:restoreLoadout', function() local ammoType = GetPedAmmoTypeFromWeapon(ESX.PlayerData.ped, weaponHash) - for k2, v2 in ipairs(v.components) do + for _, v2 in ipairs(v.components) do local componentHash = ESX.GetWeaponComponent(weaponName, v2).hash GiveWeaponComponentToPed(ESX.PlayerData.ped, weaponHash, componentHash) end @@ -315,17 +315,17 @@ if not Config.OxInventory then end) RegisterNetEvent('esx:addWeapon') - AddEventHandler('esx:addWeapon', function(weapon, ammo) + AddEventHandler('esx:addWeapon', function() print("[^1ERROR^7] event ^5'esx:addWeapon'^7 Has Been Removed. Please use ^5xPlayer.addWeapon^7 Instead!") end) RegisterNetEvent('esx:addWeaponComponent') - AddEventHandler('esx:addWeaponComponent', function(weapon, weaponComponent) + AddEventHandler('esx:addWeaponComponent', function() print("[^1ERROR^7] event ^5'esx:addWeaponComponent'^7 Has Been Removed. Please use ^5xPlayer.addWeaponComponent^7 Instead!") end) RegisterNetEvent('esx:setWeaponAmmo') - AddEventHandler('esx:setWeaponAmmo', function(weapon, weaponAmmo) + AddEventHandler('esx:setWeaponAmmo', function() print("[^1ERROR^7] event ^5'esx:setWeaponAmmo'^7 Has Been Removed. Please use ^5xPlayer.addWeaponAmmo^7 Instead!") end) @@ -337,7 +337,6 @@ if not Config.OxInventory then RegisterNetEvent('esx:removeWeapon') AddEventHandler('esx:removeWeapon', function(weapon) - local playerPed = ESX.PlayerData.ped RemoveWeaponFromPed(ESX.PlayerData.ped, joaat(weapon)) SetPedAmmo(ESX.PlayerData.ped, joaat(weapon), 0) end) @@ -468,7 +467,7 @@ if not Config.OxInventory then while true do local Sleep = 1500 local playerCoords = GetEntityCoords(ESX.PlayerData.ped) - local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer(playerCoords) + local _, closestDistance = ESX.Game.GetClosestPlayer(playerCoords) for pickupId, pickup in pairs(pickups) do local distance = #(playerCoords - pickup.coords)