diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index a1c845b71..2d1c58624 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -94,4 +94,5 @@ fix lint error: unused argument last; accessing undefined variable Invoke; unuse 68. [bpt_teleport]: chore: update the license file and readme for the year 2024 @bitpredator 69. [bpt_unicornjob]: refactor: bpt_unicornjob inventory implementation @bitpredator 70. [bpt_vehicletax]: chore: bpt_vehicletax update to version 1.0.0 @bitpredator -71. [bpt_wallet]: chore: bpt_wallet update to version 1.0.0 @bitpredator \ No newline at end of file +71. [bpt_wallet]: chore: bpt_wallet update to version 1.0.0 @bitpredator +72. [es_extended]: chore: es_extended add underflow check for removeAccountMoney @bitpredator \ No newline at end of file diff --git a/server-data/resources/[esx]/es_extended/LICENSE b/server-data/resources/[esx]/es_extended/LICENSE index 26ecd4f64..7c1b638e7 100644 --- a/server-data/resources/[esx]/es_extended/LICENSE +++ b/server-data/resources/[esx]/es_extended/LICENSE @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 2022-2023 bitpredator + Copyright (C) 2022-2024 bitpredator This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) 2022-2023 bitpredator + Copyright (C) 2022-2024 bitpredator This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/server-data/resources/[esx]/es_extended/client/functions.lua b/server-data/resources/[esx]/es_extended/client/functions.lua index f50f50fe1..8452bf99b 100644 --- a/server-data/resources/[esx]/es_extended/client/functions.lua +++ b/server-data/resources/[esx]/es_extended/client/functions.lua @@ -629,7 +629,7 @@ function ESX.Game.GetVehicleProperties(vehicle) if customXenonColorR and customXenonColorG and customXenonColorB then customXenonColor = {customXenonColorR, customXenonColorG, customXenonColorB} end - + local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle) local customSecondaryColor = nil if hasCustomSecondaryColor then diff --git a/server-data/resources/[esx]/es_extended/fxmanifest.lua b/server-data/resources/[esx]/es_extended/fxmanifest.lua index 2c20299a6..4cf63e864 100644 --- a/server-data/resources/[esx]/es_extended/fxmanifest.lua +++ b/server-data/resources/[esx]/es_extended/fxmanifest.lua @@ -5,7 +5,7 @@ game 'gta5' description 'ES Extended' lua54 'yes' -version '0.0.4' +version '1.0.0' shared_scripts { 'locale.lua', diff --git a/server-data/resources/[esx]/es_extended/readme.md b/server-data/resources/[esx]/es_extended/readme.md index acd550aac..644f52199 100644 --- a/server-data/resources/[esx]/es_extended/readme.md +++ b/server-data/resources/[esx]/es_extended/readme.md @@ -36,4 +36,4 @@ add_ace resource.es_extended command.stop allow es_extended - ESX framework for FiveM -Copyright (C) 2015-2023 Jérémie N'gadi - Rework by bitpredator \ No newline at end of file +Copyright (C) 2015-2024 Jérémie N'gadi - Rework by bitpredator \ No newline at end of file diff --git a/server-data/resources/[esx]/es_extended/server/classes/player.lua b/server-data/resources/[esx]/es_extended/server/classes/player.lua index e528a71f9..ca0104567 100644 --- a/server-data/resources/[esx]/es_extended/server/classes/player.lua +++ b/server-data/resources/[esx]/es_extended/server/classes/player.lua @@ -243,6 +243,10 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, if account then money = account.round and ESX.Math.Round(money) or money + if self.accounts[account.index].money - money > self.accounts[account.index].money then + print(('[^1ERROR^7] Tried To Underflow Account ^5%s^0 For Player ^5%s^0!'):format(accountName, self.playerId)) + return + end self.accounts[account.index].money = self.accounts[account.index].money - money self.triggerEvent('esx:setAccountMoney', account) diff --git a/server-data/resources/[esx]/es_extended/server/functions.lua b/server-data/resources/[esx]/es_extended/server/functions.lua index 073138301..e67a22475 100644 --- a/server-data/resources/[esx]/es_extended/server/functions.lua +++ b/server-data/resources/[esx]/es_extended/server/functions.lua @@ -50,7 +50,7 @@ function ESX.RegisterCommand(name, group, cb, allowConsole, suggestion) Core.RegisteredCommands[name] = {group = group, cb = cb, allowConsole = allowConsole, suggestion = suggestion} - RegisterCommand(name, function(playerId, args, _) + RegisterCommand(name, function(playerId, args) local command = Core.RegisteredCommands[name] if not command.allowConsole and playerId == 0 then @@ -167,7 +167,7 @@ function ESX.RegisterServerCallback(name, cb) Core.ServerCallbacks[name] = cb end -function ESX.TriggerServerCallback(name, _, source,Invoke, cb, ...) +function ESX.TriggerServerCallback(name, _, source, Invoke, cb, ...) if Core.ServerCallbacks[name] then Core.ServerCallbacks[name](source, cb, ...) else