diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index 3e67ce50..a9a7a597 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -155,9 +155,9 @@ if GetResourceState("esx_context") ~= "missing" then end function ESX.RefreshContext(...) - exports["esx_context"]:Refresh(...) + exports["esx_context"]:Refresh(...) end -else +else function ESX.OpenContext() print("[^1ERROR^7] Tried to ^5open^7 context menu, but ^5esx_context^7 is missing!") end @@ -358,7 +358,7 @@ end function ESX.Game.SpawnObject(object, coords, cb, networked) networked = networked == nil and true or networked - if networked then + if networked then ESX.TriggerServerCallback('esx:Onesync:SpawnObject', function(NetworkID) if cb then local obj = NetworkGetEntityFromNetworkId(NetworkID) @@ -374,7 +374,7 @@ function ESX.Game.SpawnObject(object, coords, cb, networked) cb(obj) end end, object, coords, 0.0) - else + else local model = type(object) == 'number' and object or joaat(object) local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) CreateThread(function() @@ -408,7 +408,7 @@ function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked) networked = networked == nil and true or networked local playerCoords = GetEntityCoords(ESX.PlayerData.ped) - if not vector or not playerCoords then + if not vector or not playerCoords then return end local dist = #(playerCoords - vector) @@ -610,7 +610,7 @@ function ESX.Game.GetVehicleProperties(vehicle) local hasCustomXenonColor, customXenonColorR, customXenonColorG, customXenonColorB = GetVehicleXenonLightsCustomColor(vehicle) local customXenonColor = nil - if hasCustomXenonColor then + if hasCustomXenonColor then customXenonColor = {customXenonColorR, customXenonColorG, customXenonColorB} end diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index 129b800f..487261ad 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -80,7 +80,7 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin) if seat == 0 then SetPedIntoVehicle(ESX.PlayerData.ped, vehicle, 0) SetPedConfigFlag(ESX.PlayerData.ped, 184, true) - end + end end) end @@ -242,8 +242,8 @@ end) -- Credit: https://github.com/LukeWasTakenn, https://github.com/LukeWasTakenn/luke_garages/blob/master/client/client.lua#L331-L352 AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value) - if not value then - return + if not value then + return end local netId = bagName:gsub('entity:', '') diff --git a/[core]/es_extended/locales/fi.lua b/[core]/es_extended/locales/fi.lua index dec71c80..0bebfca2 100644 --- a/[core]/es_extended/locales/fi.lua +++ b/[core]/es_extended/locales/fi.lua @@ -75,7 +75,7 @@ Locales['fi'] = { ['command_giveweapon_hasalready'] = 'Pelaajalla on jo kyseinen ase', ['command_giveweaponcomponent'] = 'Anna aseen komponentti', ['command_giveweaponcomponent_component'] = 'Komponentin nimi', - ['command_giveweaponcomponent_invalid'] = 'Virheellinen aseen komponentti', + ['command_giveweaponcomponent_invalid'] = 'Virheellinen aseen komponentti', ['command_giveweaponcomponent_hasalready'] = 'Pelaajalla on jo kyseinen asekomponentti', ['command_giveweaponcomponent_missingweapon'] = 'Pelaajalla ei ole kyseistä asetta', ['command_save'] = 'Talenna pelaaja tietokantaan', @@ -105,7 +105,7 @@ Locales['fi'] = { ['command_giveammo_ammo'] = 'Ammusten määrä', -- Locale settings - ['locale_digit_grouping_symbol'] = ' ', + ['locale_digit_grouping_symbol'] = '', ['locale_currency'] = '$%s', -- Weapons diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index bb179742..4e2bed7c 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -57,8 +57,8 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, local heading = GetEntityHeading(Ped) self.coords = { x = coords.x, - y = coords.y, - z = coords.z, + y = coords.y, + z = coords.z, heading = heading or 0.0 } end @@ -203,7 +203,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, function self.setAccountMoney(accountName, money, reason) reason = reason or 'unknown' - if not tonumber(money) then + if not tonumber(money) then print(('[^1ERROR^7] Tried To Set Account ^5%s^0 For Player ^5%s^0 To An Invalid Number -> ^5%s^7'):format(accountName, self.playerId, money)) return end @@ -216,17 +216,17 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, self.triggerEvent('esx:setAccountMoney', account) TriggerEvent('esx:setAccountMoney', self.source, accountName, money, reason) - else + else print(('[^1ERROR^7] Tried To Set Invalid Account ^5%s^0 For Player ^5%s^0!'):format(accountName, self.playerId)) end - else + else print(('[^1ERROR^7] Tried To Set Account ^5%s^0 For Player ^5%s^0 To An Invalid Number -> ^5%s^7'):format(accountName, self.playerId, money)) end end function self.addAccountMoney(accountName, money, reason) reason = reason or 'Unknown' - if not tonumber(money) then + if not tonumber(money) then print(('[^1ERROR^7] Tried To Set Account ^5%s^0 For Player ^5%s^0 To An Invalid Number -> ^5%s^7'):format(accountName, self.playerId, money)) return end @@ -238,17 +238,17 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, self.triggerEvent('esx:setAccountMoney', account) TriggerEvent('esx:addAccountMoney', self.source, accountName, money, reason) - else + else print(('[^1ERROR^7] Tried To Set Add To Invalid Account ^5%s^0 For Player ^5%s^0!'):format(accountName, self.playerId)) end - else + else print(('[^1ERROR^7] Tried To Set Account ^5%s^0 For Player ^5%s^0 To An Invalid Number -> ^5%s^7'):format(accountName, self.playerId, money)) end end function self.removeAccountMoney(accountName, money, reason) reason = reason or 'Unknown' - if not tonumber(money) then + if not tonumber(money) then print(('[^1ERROR^7] Tried To Set Account ^5%s^0 For Player ^5%s^0 To An Invalid Number -> ^5%s^7'):format(accountName, self.playerId, money)) return end @@ -261,10 +261,10 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, self.triggerEvent('esx:setAccountMoney', account) TriggerEvent('esx:removeAccountMoney', self.source, accountName, money, reason) - else + else print(('[^1ERROR^7] Tried To Set Add To Invalid Account ^5%s^0 For Player ^5%s^0!'):format(accountName, self.playerId)) end - else + else print(('[^1ERROR^7] Tried To Set Account ^5%s^0 For Player ^5%s^0 To An Invalid Number -> ^5%s^7'):format(accountName, self.playerId, money)) end end diff --git a/[core]/es_extended/server/commands.lua b/[core]/es_extended/server/commands.lua index b89ae36a..64bd9b51 100644 --- a/[core]/es_extended/server/commands.lua +++ b/[core]/es_extended/server/commands.lua @@ -76,7 +76,7 @@ ESX.RegisterCommand('car', 'admin', function(xPlayer, args, showError) end) end, false, {help = TranslateCap('command_car'), validate = false, arguments = { {name = 'car',validate = false, help = TranslateCap('command_car_car'), type = 'string'} -}}) +}}) ESX.RegisterCommand({'cardel', 'dv'}, 'admin', function(xPlayer, args, showError) local PedVehicle = GetVehiclePedIsIn(GetPlayerPed(xPlayer.source), false) @@ -84,7 +84,7 @@ ESX.RegisterCommand({'cardel', 'dv'}, 'admin', function(xPlayer, args, showError DeleteEntity(PedVehicle) end local Vehicles = ESX.OneSync.GetVehiclesInArea(GetEntityCoords(GetPlayerPed(xPlayer.source)), tonumber(args.radius) or 5.0) - for i=1, #Vehicles do + for i=1, #Vehicles do local Vehicle = NetworkGetEntityFromNetworkId(Vehicles[i]) if DoesEntityExist(Vehicle) then DeleteEntity(Vehicle) @@ -141,7 +141,7 @@ if not Config.OxInventory then ESX.RegisterCommand('giveammo', 'admin', function(xPlayer, args, showError) if args.playerId.hasWeapon(args.weapon) then - args.playerId.addWeaponAmmo(args.weapon, args.ammo) + args.playerId.addWeaponAmmo(args.weapon, args.ammo) else showError(TranslateCap("command_giveammo_noweapon_found")) end @@ -293,7 +293,7 @@ end, false) ESX.RegisterCommand('players', "admin", function(xPlayer, args, showError) local xPlayers = ESX.GetExtendedPlayers() -- Returns all xPlayers print("^5"..#xPlayers.." ^2online player(s)^0") - for i=1, #(xPlayers) do + for i=1, #(xPlayers) do local xPlayer = xPlayers[i] print("^1[ ^2ID : ^5"..xPlayer.source.." ^0| ^2Name : ^5"..xPlayer.getName().." ^0 | ^2Group : ^5"..xPlayer.getGroup().." ^0 | ^2Identifier : ^5".. xPlayer.identifier .."^1]^0\n") end diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index b68dc327..990cc2a1 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -158,7 +158,7 @@ function Core.SavePlayer(xPlayer, cb) xPlayer.job.grade, xPlayer.group, json.encode(xPlayer.getCoords()), - json.encode(xPlayer.getInventory(true)), + json.encode(xPlayer.getInventory(true)), json.encode(xPlayer.getLoadout(true)), json.encode(xPlayer.getMeta()), xPlayer.identifier @@ -204,7 +204,7 @@ function Core.SavePlayers(cb) MySQL.prepare( "UPDATE `users` SET `accounts` = ?, `job` = ?, `job_grade` = ?, `group` = ?, `position` = ?, `inventory` = ?, `loadout` = ?, `metadata` = ? WHERE `identifier` = ?", - parameters, + parameters, function(results) if not results then return @@ -244,7 +244,7 @@ function ESX.GetPlayerFromIdentifier(identifier) end function ESX.GetIdentifier(playerId) - local fxDk = GetConvarInt('sv_fxdkMode', 0) + local fxDk = GetConvarInt('sv_fxdkMode', 0) if fxDk == 1 then return "ESX-DEBUG-LICENCE" end @@ -306,7 +306,7 @@ function ESX.DiscordLogFields(name, title, color, fields) ['text'] = "| ESX Logs | " .. os.date(), ['icon_url'] = "https://cdn.discordapp.com/attachments/944789399852417096/1020099828266586193/blanc-800x800.png" }, - ['fields'] = fields, + ['fields'] = fields, ['description'] = "", ['author'] = { ['name'] = "ESX Framework", diff --git a/[core]/es_extended/server/onesync.lua b/[core]/es_extended/server/onesync.lua index 3e451bb8..bcb694a7 100644 --- a/[core]/es_extended/server/onesync.lua +++ b/[core]/es_extended/server/onesync.lua @@ -76,7 +76,7 @@ function ESX.OneSync.SpawnVehicle(model, coords, heading, properties, cb) local networkId = NetworkGetNetworkIdFromEntity(createdVehicle) Entity(createdVehicle).state:set('VehicleProperties', vehicleProperties, true) cb(networkId) - else + else print(('[^1ERROR^7] Tried to spawn invalid vehicle - ^5%s^7!'):format(model)) end end) diff --git a/[core]/esx_context/main.lua b/[core]/esx_context/main.lua index 55bfad9c..a71ea8f8 100644 --- a/[core]/esx_context/main.lua +++ b/[core]/esx_context/main.lua @@ -87,7 +87,7 @@ end) RegisterNUICallback("selected",function(data,cb) if not activeMenu or not activeMenu.onSelect - or not data.index + or not data.index then return end @@ -96,7 +96,7 @@ RegisterNUICallback("selected",function(data,cb) local ele = activeMenu.eles[index] if not ele - or ele.input + or ele.input then return end @@ -107,7 +107,7 @@ end) RegisterNUICallback("changed",function(data,cb) if not activeMenu - or not data.index + or not data.index or not data.value then return @@ -117,7 +117,7 @@ RegisterNUICallback("changed",function(data,cb) local ele = activeMenu.eles[index] if not ele - or not ele.input + or not ele.input then return end @@ -144,7 +144,7 @@ end) local function focusPreview() if not activeMenu - or not activeMenu.onSelect + or not activeMenu.onSelect then return end diff --git a/[core]/esx_identity/server/main.lua b/[core]/esx_identity/server/main.lua index b9513cee..6dc01b43 100644 --- a/[core]/esx_identity/server/main.lua +++ b/[core]/esx_identity/server/main.lua @@ -301,7 +301,7 @@ else if not identifier then return deferrals.done(TranslateCap('no_identifier')) end - MySQL.single('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = ?', {identifier}, + MySQL.single('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = ?', {identifier}, function(result) if not result then playerIdentity[identifier] = nil @@ -338,7 +338,7 @@ else local xPlayers = ESX.GetExtendedPlayers() - for i=1, #(xPlayers) do + for i=1, #(xPlayers) do if xPlayers[i] then checkIdentity(xPlayers[i]) end @@ -393,7 +393,7 @@ else TriggerClientEvent('esx:showNotification',source,TranslateCap('invalid_height_format'), "error") return cb(false) end - if xPlayer then + if xPlayer then if alreadyRegistered[xPlayer.identifier] then xPlayer.showNotification(TranslateCap('already_registered'), "error") return cb(false) diff --git a/[core]/esx_multicharacter/client/main.lua b/[core]/esx_multicharacter/client/main.lua index 4cb35486..7f1f4bc2 100644 --- a/[core]/esx_multicharacter/client/main.lua +++ b/[core]/esx_multicharacter/client/main.lua @@ -159,9 +159,9 @@ if ESX.GetConfig().Multichar then end 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}, + local elements = {{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'),} diff --git a/[core]/esx_multicharacter/locales/fi.lua b/[core]/esx_multicharacter/locales/fi.lua index 77125556..a5beae2d 100644 --- a/[core]/esx_multicharacter/locales/fi.lua +++ b/[core]/esx_multicharacter/locales/fi.lua @@ -16,10 +16,10 @@ Locales["fi"] = { ["char_delete_no_description"] = "Ei, Palaa hahmojen valintaan", ["character"] = "Hahmo: %s", ["return"] = "Takaisin", - ["return_description"] = "Palaa hahmojen valintaan.", - ["command_setslots"] = "Määritä pelaajan multicharacter paikkojen määrä", + ["return_description"] = "Palaa hahmojen valintaan.", + ["command_setslots"] = "Määritä pelaajan multicharacter paikkojen määrä", ["command_remslots"] = "Vähennä pelaajan multicharacter paikkojen määrää", - ["command_enablechar"] = "Muuta pelaajan tietty hahmo käyttöön", + ["command_enablechar"] = "Muuta pelaajan tietty hahmo käyttöön", ["command_disablechar"] = "Muuta pelaajan tietty hahmo pois käytöstä", ["command_charslot"] = "Hahmon paikan numero", ["command_identifier"] = "Pelaajan tunniste", diff --git a/[core]/esx_multicharacter/server/main.lua b/[core]/esx_multicharacter/server/main.lua index 50b23cee..e07debe4 100644 --- a/[core]/esx_multicharacter/server/main.lua +++ b/[core]/esx_multicharacter/server/main.lua @@ -29,7 +29,7 @@ end local PRIMARY_IDENTIFIER = ESX.GetConfig().Identifier or GetConvar('sv_lan', '') == 'true' and 'ip' or "license" local function GetIdentifier(source) - local fxDk = GetConvarInt('sv_fxdkMode', 0) + local fxDk = GetConvarInt('sv_fxdkMode', 0) if fxDk == 1 then return "ESX-DEBUG-LICENCE" end diff --git a/[core]/esx_progressbar/Progress.lua b/[core]/esx_progressbar/Progress.lua index c3e0d9a2..5cb1dfe0 100644 --- a/[core]/esx_progressbar/Progress.lua +++ b/[core]/esx_progressbar/Progress.lua @@ -4,7 +4,7 @@ local function Progressbar(message,length,Options) return false end CurrentProgress = Options or {} - if CurrentProgress.animation then + if CurrentProgress.animation then if CurrentProgress.animation.type == "anim" then ESX.Streaming.RequestAnimDict(CurrentProgress.animation.dict, function() TaskPlayAnim(ESX.PlayerData.ped, CurrentProgress.animation.dict, CurrentProgress.animation.lib, 1.0, 1.0, length, 1, 1.0, false,false,false) @@ -22,7 +22,7 @@ local function Progressbar(message,length,Options) }) CurrentProgress.length = length or 3000 while CurrentProgress ~= nil do - if CurrentProgress.length > 0 then + if CurrentProgress.length > 0 then CurrentProgress.length = CurrentProgress.length - 1000 else ClearPedTasks(ESX.PlayerData.ped) diff --git a/[core]/esx_skin/config.lua b/[core]/esx_skin/config.lua index 0c547956..448182ce 100644 --- a/[core]/esx_skin/config.lua +++ b/[core]/esx_skin/config.lua @@ -3,8 +3,8 @@ Config = {} Config.Locale = GetConvar('esx:locale', 'en') Config.BackpackWeight = { - [40] = 16, - [41] = 20, - [44] = 25, + [40] = 16, + [41] = 20, + [44] = 25, [45] = 23 }