From 6b6667b4c5a20e96d3711e37e6bcfcd46b7efee0 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 14 Dec 2024 22:33:47 +0100 Subject: [PATCH 01/69] Merge pull request #1539 from Kenshiin13/spawn-vehicle feat(es_extended): add promise support for vehicle spawn functions --- [core]/es_extended/client/functions.lua | 25 +++++++-- [core]/es_extended/server/modules/onesync.lua | 56 +++++++++++++------ 2 files changed, 60 insertions(+), 21 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index 8c35eae6..8a577e7e 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -530,10 +530,14 @@ end ---@param vehicleModel integer | string The vehicle to spawn ---@param coords table | vector3 The coords to spawn the vehicle at ---@param heading number The heading of the vehicle ----@param cb? function The callback function +---@param cb? fun(vehicle: number) The callback function ---@param networked? boolean Whether the vehicle should be networked ----@return nil +---@return number? vehicle function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked) + if cb and not ESX.IsFunctionReference(cb) then + error("Invalid callback function") + end + local model = type(vehicleModel) == "number" and vehicleModel or joaat(vehicleModel) local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) local isNetworked = networked == nil or networked @@ -549,8 +553,15 @@ function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked) return error(("Resource ^5%s^1 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(executingResource)) end + local promise = not cb and promise.new() CreateThread(function() - ESX.Streaming.RequestModel(model) + local modelHash = ESX.Streaming.RequestModel(model) + if not modelHash then + if promise then + return promise:reject(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model)) + end + error(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model)) + end local vehicle = CreateVehicle(model, vector.x, vector.y, vector.z, heading, isNetworked, true) @@ -569,10 +580,16 @@ function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked) Wait(0) end - if cb then + if promise then + promise:resolve(vehicle) + elseif cb then cb(vehicle) end end) + + if promise then + return Citizen.Await(promise) + end end ---@param vehicle integer The vehicle to spawn diff --git a/[core]/es_extended/server/modules/onesync.lua b/[core]/es_extended/server/modules/onesync.lua index 87c5f7f0..cb914a17 100644 --- a/[core]/es_extended/server/modules/onesync.lua +++ b/[core]/es_extended/server/modules/onesync.lua @@ -82,35 +82,57 @@ end ---@param coords vector3|table ---@param heading number ---@param properties table ----@param cb function +---@param cb? fun(netId: number) +---@return number? netId function ESX.OneSync.SpawnVehicle(model, coords, heading, properties, cb) + if cb and not ESX.IsFunctionReference(cb) then + error("Invalid callback function") + end + + local vehicleModel = joaat(model) local vehicleProperties = properties + local promise = not cb and promise.new() CreateThread(function() local xPlayer = ESX.OneSync.GetClosestPlayer(coords, 300) ESX.GetVehicleType(vehicleModel, xPlayer.id, function(vehicleType) - if vehicleType then - local createdVehicle = CreateVehicleServerSetter(vehicleModel, vehicleType, coords.x, coords.y, coords.z, heading) - local tries = 0 - - while not createdVehicle or createdVehicle == 0 or not GetEntityCoords(createdVehicle) do - Wait(200) - tries = tries + 1 - if tries > 20 then - return error(("Could not spawn vehicle - ^5%s^7!"):format(model)) - end + if not vehicleType then + if (promise) then + return promise:reject(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model)) end - -- luacheck: ignore - SetEntityOrphanMode(createdVehicle, 2) - local networkId = NetworkGetNetworkIdFromEntity(createdVehicle) - Entity(createdVehicle).state:set("VehicleProperties", vehicleProperties, true) - cb(networkId) - else error(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model)) end + + local createdVehicle = CreateVehicleServerSetter(vehicleModel, vehicleType, coords.x, coords.y, coords.z, heading) + local tries = 0 + + while not createdVehicle or createdVehicle == 0 or not GetEntityCoords(createdVehicle) do + Wait(200) + tries = tries + 1 + if tries > 20 then + if promise then + return promise:reject(("Could not spawn vehicle - ^5%s^7!"):format(model)) + end + error(("Could not spawn vehicle - ^5%s^7!"):format(model)) + end + end + + -- luacheck: ignore + SetEntityOrphanMode(createdVehicle, 2) + local networkId = NetworkGetNetworkIdFromEntity(createdVehicle) + Entity(createdVehicle).state:set("VehicleProperties", vehicleProperties, true) + if promise then + promise:resolve(networkId) + elseif cb then + cb(networkId) + end end) end) + + if promise then + return Citizen.Await(promise) + end end ---@param model number|string From 8ea8b4a69f8347b974560e7c6b98c52eecff29c7 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:02:19 +0100 Subject: [PATCH 02/69] feat(es_extended/server/classes/vehicle): add vehicle class --- [core]/es_extended/fxmanifest.lua | 1 + [core]/es_extended/server/classes/vehicle.lua | 209 ++++++++++++++++++ [core]/es_extended/server/common.lua | 2 + 3 files changed, 212 insertions(+) create mode 100644 [core]/es_extended/server/classes/vehicle.lua diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index 848289bf..ffc8aa8c 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -25,6 +25,7 @@ server_scripts { 'server/common.lua', 'server/modules/callback.lua', 'server/classes/player.lua', + 'server/classes/vehicle.lua', 'server/classes/overrides/*.lua', 'server/functions.lua', 'server/modules/onesync.lua', diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua new file mode 100644 index 00000000..2f5d87f3 --- /dev/null +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -0,0 +1,209 @@ +---@class DbVehicle +---@field owner string +---@field plate string +---@field vehicle string +---@field type string +---@field job? string +---@field stored boolean +---@field parking? string +---@field pound? string + +---@class VehicleData +---@field plate string +---@field netId number +---@field entity number +---@field modelHash number +---@field owner string + +---@class VehicleClass +---@field plate string +---@field isValid fun(self:VehicleClass):boolean +---@field new fun(owner:string, plate:string, coords:vector4): VehicleClass? +---@field getPlate fun(self:VehicleClass):string? +---@field getNetId fun(self:VehicleClass):number? +---@field getEntity fun(self:VehicleClass):number? +---@field getModelHash fun(self:VehicleClass):number? +---@field getProps fun(self:VehicleClass):table? +---@field getOwner fun(self:VehicleClass):string? +---@field setPlate fun(self:VehicleClass, plate:string):boolean +---@field setProps fun(self:VehicleClass, props:table):boolean +---@field setOwner fun(self:VehicleClass, owner:string):boolean +---@field delete fun(self:VehicleClass):nil +Core.vehicleClass = { + plate = "", + new = function(owner, plate, coords) + assert(type(owner) == "string", "Expected 'owner' to be a string") + assert(type(plate) == "string", "Expected 'plate' to be a string") + assert(type(coords) == "vector4", "Expected 'coords' to be a vector4") + + if Core.vehicles[plate] then + local obj = table.clone(Core.vehicleClass) + obj.plate = plate + + if obj:isValid() then + return obj + end + end + + local dbVehicle = MySQL.single.await("SELECT * FROM `owned_vehicles` WHERE `stored` = true AND `owner` = ? AND `plate` = ?", { owner, plate }) --[[@as DbVehicle]] + if not dbVehicle then + return + end + + local vehicleProps = json.decode(dbVehicle.vehicle) + if type(vehicleProps.model) ~= "number" then + model = joaat(model) + end + + local netId = ESX.OneSync.SpawnVehicle(model, coords.xyz, coords.w, vehicleProps) + if not netId then + return + end + + local entity = NetworkGetEntityFromNetworkId(netId) + if entity <= 0 then + return + end + + Entity(entity).state:set("owner", owner, false) + + local vehicle = { + plate = plate, + entity = entity, + netId = netId, + modelHash = model, + owner = owner, + } + Core.vehicles[plate] = vehicle + + MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = 0 WHERE `owner` = ? AND `plate` = ?", { owner, plate }) + + local obj = table.clone(Core.vehicleClass) + obj.plate = plate + TriggerEvent("esx:createdExtendedVehicle", obj) + + return obj + end, + isValid = function(self) + local xVehicle = Core.vehicles[self.plate] + if not xVehicle then + return false + end + + local entity = NetworkGetEntityFromNetworkId(xVehicle.netId) + if entity <= 0 or Entity(entity).state.owner ~= xVehicle.owner then + self:delete() + return false + end + + local plate = ESX.Math.Trim(GetVehicleNumberPlateText(entity)) + if plate ~= xVehicle.plate then + self:delete() + return false + end + + xVehicle.entity = entity + + return true + end, + getNetId = function(self) + if not self:isValid() then + return + end + + return Core.vehicles[self.plate].netId + end, + getEntity = function(self) + if not self:isValid() then + return + end + + return Core.vehicles[self.plate].entity + end, + getPlate = function(self) + if not self:isValid() then + return + end + + return Core.vehicles[self.plate].plate + end, + getModelHash = function(self) + if not self:isValid() then + return + end + + return Core.vehicles[self.plate].modelHash + end, + getProps = function(self) + if not self:isValid() then + return + end + + return Core.vehicles[self.plate].props + end, + getOwner = function(self) + if not self:isValid() then + return + end + + return Core.vehicles[self.plate].owner + end, + setPlate = function(self, plate) + if not self:isValid() then + return false + end + assert(type(plate) == "string", "Expected 'plate' to be a string") + + local xVehicle = Core.vehicles[self.plate] + SetVehicleNumberPlateText(xVehicle.entity, plate) + xVehicle.plate = plate + MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { plate, xVehicle.plate, xVehicle.owner }) + + return true + end, + setProps = function(self, props) + if not self:isValid() then + return false + end + assert(type(props) == "table", "Expected 'props' to be a table") + + local xVehicle = Core.vehicles[self.plate] + Entity(xVehicle.entity).state:set("VehicleProperties", props, true) + MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(props), xVehicle.plate, xVehicle.owner) + + return true + end, + setOwner = function(self, owner) + if not self:isValid() then + return false + end + assert(type(owner) == "string", "Expected 'owner' to be a string") + + local xVehicle = Core.vehicles[self.plate] + if xVehicle.owner == owner then + return true + end + + Entity(xVehicle.entity).state:set("owner", owner, false) + xVehicle.owner = owner + MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE `plate` = ?", { owner, xVehicle.plate }) + + return true + end, + delete = function(self) + local xVehicle = Core.vehicles[self.plate] + if not xVehicle then + return + end + + local entity = NetworkGetEntityFromNetworkId(xVehicle.netId) + if entity >= 0 and Entity(entity).state.owner == xVehicle.owner then + DeleteEntity(xVehicle.entity) + end + + MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = 1 WHERE `plate` = ?", { xVehicle.plate }) + TriggerEvent("esx:deletedExtendedVehicle", self) + + Core.vehicles[self.plate] = nil + end, +} diff --git a/[core]/es_extended/server/common.lua b/[core]/es_extended/server/common.lua index edbc3952..2e6845c4 100644 --- a/[core]/es_extended/server/common.lua +++ b/[core]/es_extended/server/common.lua @@ -11,6 +11,8 @@ Core.PlayerFunctionOverrides = {} Core.DatabaseConnected = false Core.playersByIdentifier = {} +---@type table +Core.vehicles = {} Core.vehicleTypesByModel = {} RegisterNetEvent("esx:onPlayerSpawn", function() From 3d16c4fecdeb811e6ebab9846cbadb406c3a4543 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:02:45 +0100 Subject: [PATCH 03/69] feat(es_extended/server/functions): add exposed vehicle class functions --- [core]/es_extended/server/functions.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 884ef4a5..4d61617f 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -615,3 +615,23 @@ function Core.IsPlayerAdmin(playerId) local xPlayer = ESX.Players[playerId] return (xPlayer and Config.AdminGroups[xPlayer.group] and true) or false end + +---@param owner string +---@param plate string +---@param coords vector4 +---@return VehicleClass? +function ESX.CreateExtendedVehicle(owner, plate, coords) + return Core.vehicleClass.new(owner, plate, coords) +end + +---@param plate string +---@return VehicleClass? +function ESX.GetExtendedVehicleFromPlate(plate) + assert(type(plate) == "string", "Expected 'plate' to be a string") + + if Core.vehicles[plate] then + local obj = table.clone(Core.vehicleClass) + obj.plate = plate + return obj + end +end \ No newline at end of file From 5c44b5c8551c578e3da08c3da5350219ebcded4e Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:25:38 +0100 Subject: [PATCH 04/69] refactor(es_extended/server/functions): move ESX.GetExtendedVehicleFromPlate logic into vehicle class --- [core]/es_extended/server/classes/vehicle.lua | 21 ++++++++++++------- [core]/es_extended/server/functions.lua | 6 +----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 2f5d87f3..469cedb6 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -19,6 +19,7 @@ ---@field plate string ---@field isValid fun(self:VehicleClass):boolean ---@field new fun(owner:string, plate:string, coords:vector4): VehicleClass? +---@field getFromPlate fun(plate:string):VehicleClass? ---@field getPlate fun(self:VehicleClass):string? ---@field getNetId fun(self:VehicleClass):number? ---@field getEntity fun(self:VehicleClass):number? @@ -36,13 +37,9 @@ Core.vehicleClass = { assert(type(plate) == "string", "Expected 'plate' to be a string") assert(type(coords) == "vector4", "Expected 'coords' to be a vector4") - if Core.vehicles[plate] then - local obj = table.clone(Core.vehicleClass) - obj.plate = plate - - if obj:isValid() then - return obj - end + local xVehicle = Core.vehicleClass.getFromPlate(plate) + if xVehicle then + return xVehicle end local dbVehicle = MySQL.single.await("SELECT * FROM `owned_vehicles` WHERE `stored` = true AND `owner` = ? AND `plate` = ?", { owner, plate }) --[[@as DbVehicle]] @@ -84,6 +81,16 @@ Core.vehicleClass = { return obj end, + getFromPlate = function(plate) + if Core.vehicles[plate] then + local obj = table.clone(Core.vehicleClass) + obj.plate = plate + + if obj:isValid() then + return obj + end + end + end, isValid = function(self) local xVehicle = Core.vehicles[self.plate] if not xVehicle then diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 4d61617f..90c5bc4f 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -629,9 +629,5 @@ end function ESX.GetExtendedVehicleFromPlate(plate) assert(type(plate) == "string", "Expected 'plate' to be a string") - if Core.vehicles[plate] then - local obj = table.clone(Core.vehicleClass) - obj.plate = plate - return obj - end + return Core.vehicleClass.getFromPlate(plate) end \ No newline at end of file From 520446a6acfeec1635a2784c0017e5390cc33c48 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:33:30 +0100 Subject: [PATCH 05/69] refactor(es_extended/server/classes/vehicle): only select relevant data from db --- [core]/es_extended/server/classes/vehicle.lua | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 469cedb6..e23084cc 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -1,13 +1,3 @@ ----@class DbVehicle ----@field owner string ----@field plate string ----@field vehicle string ----@field type string ----@field job? string ----@field stored boolean ----@field parking? string ----@field pound? string - ---@class VehicleData ---@field plate string ---@field netId number @@ -42,12 +32,12 @@ Core.vehicleClass = { return xVehicle end - local dbVehicle = MySQL.single.await("SELECT * FROM `owned_vehicles` WHERE `stored` = true AND `owner` = ? AND `plate` = ?", { owner, plate }) --[[@as DbVehicle]] - if not dbVehicle then + local vehicleProps = MySQL.scalar.await("SELECT `vehicle` FROM `owned_vehicles` WHERE `stored` = true AND `owner` = ? AND `plate` = ? LIMIT 1", { owner, plate }) + if not vehicleProps then return end + vehicleProps = json.decode(vehicleProps.vehicle) - local vehicleProps = json.decode(dbVehicle.vehicle) if type(vehicleProps.model) ~= "number" then model = joaat(model) end From 68508b96f0cf83c5fdb9bfbf156f1deb70fd3d65 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:38:15 +0100 Subject: [PATCH 06/69] fix(es_extended/server/classes/vehicle): remove unused function getProps --- [core]/es_extended/server/classes/vehicle.lua | 9 --------- 1 file changed, 9 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index e23084cc..c71723bd 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -14,7 +14,6 @@ ---@field getNetId fun(self:VehicleClass):number? ---@field getEntity fun(self:VehicleClass):number? ---@field getModelHash fun(self:VehicleClass):number? ----@field getProps fun(self:VehicleClass):table? ---@field getOwner fun(self:VehicleClass):string? ---@field setPlate fun(self:VehicleClass, plate:string):boolean ---@field setProps fun(self:VehicleClass, props:table):boolean @@ -51,7 +50,6 @@ Core.vehicleClass = { if entity <= 0 then return end - Entity(entity).state:set("owner", owner, false) local vehicle = { @@ -131,13 +129,6 @@ Core.vehicleClass = { return Core.vehicles[self.plate].modelHash end, - getProps = function(self) - if not self:isValid() then - return - end - - return Core.vehicles[self.plate].props - end, getOwner = function(self) if not self:isValid() then return From 04ef04e2078f425f9a8000e1a3c15e1f5253be4c Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 01:20:28 +0100 Subject: [PATCH 07/69] fix(es_extended/server/classes/vehicle): properly parse vehicleProps --- [core]/es_extended/server/classes/vehicle.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index c71723bd..b4f0240d 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -35,7 +35,7 @@ Core.vehicleClass = { if not vehicleProps then return end - vehicleProps = json.decode(vehicleProps.vehicle) + vehicleProps = json.decode(vehicleProps) if type(vehicleProps.model) ~= "number" then model = joaat(model) From 4e6e37e7089658c63d425cff81acfb9b447917e6 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 01:25:18 +0100 Subject: [PATCH 08/69] fix(es_extended/server/classes/vehicle): fix vehicle model extraction --- [core]/es_extended/server/classes/vehicle.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index b4f0240d..edc1c240 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -38,10 +38,10 @@ Core.vehicleClass = { vehicleProps = json.decode(vehicleProps) if type(vehicleProps.model) ~= "number" then - model = joaat(model) + vehicleProps.model = joaat(vehicleProps.model) end - local netId = ESX.OneSync.SpawnVehicle(model, coords.xyz, coords.w, vehicleProps) + local netId = ESX.OneSync.SpawnVehicle(vehicleProps.model, coords.xyz, coords.w, vehicleProps) if not netId then return end @@ -56,7 +56,7 @@ Core.vehicleClass = { plate = plate, entity = entity, netId = netId, - modelHash = model, + modelHash = vehicleProps.model, owner = owner, } Core.vehicles[plate] = vehicle From 9d7c2edac040666b62af5ed9c1d67b0b9ef3d973 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Mon, 16 Dec 2024 23:00:46 +0100 Subject: [PATCH 09/69] Merge pull request #1553 from Mycroft-Studios/better-vehicle-spawning fix(es_extended/server/onesync): better vehicle spawning method --- [core]/es_extended/server/modules/onesync.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/server/modules/onesync.lua b/[core]/es_extended/server/modules/onesync.lua index cb914a17..de4f4eb8 100644 --- a/[core]/es_extended/server/modules/onesync.lua +++ b/[core]/es_extended/server/modules/onesync.lua @@ -107,10 +107,10 @@ function ESX.OneSync.SpawnVehicle(model, coords, heading, properties, cb) local createdVehicle = CreateVehicleServerSetter(vehicleModel, vehicleType, coords.x, coords.y, coords.z, heading) local tries = 0 - while not createdVehicle or createdVehicle == 0 or not GetEntityCoords(createdVehicle) do + while not createdVehicle or createdVehicle == 0 or NetworkGetEntityOwner(createdVehicle) == -1 do Wait(200) tries = tries + 1 - if tries > 20 then + if tries > 40 then if promise then return promise:reject(("Could not spawn vehicle - ^5%s^7!"):format(model)) end @@ -122,6 +122,7 @@ function ESX.OneSync.SpawnVehicle(model, coords, heading, properties, cb) SetEntityOrphanMode(createdVehicle, 2) local networkId = NetworkGetNetworkIdFromEntity(createdVehicle) Entity(createdVehicle).state:set("VehicleProperties", vehicleProperties, true) + if promise then promise:resolve(networkId) elseif cb then From 7341b37850f5756369f05b5df4ce4d6aa3435b77 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:01:01 +0100 Subject: [PATCH 10/69] fix(es_extended/server/classes/vehicle): fix plate race condition It takes a while until the vehicle plate is actually set. To combat this, we will store the plate in the entity statebag instead. --- [core]/es_extended/server/classes/vehicle.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index edc1c240..cbc9daa6 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -51,6 +51,7 @@ Core.vehicleClass = { return end Entity(entity).state:set("owner", owner, false) + Entity(entity).state:set("plate", plate, false) local vehicle = { plate = plate, @@ -86,13 +87,7 @@ Core.vehicleClass = { end local entity = NetworkGetEntityFromNetworkId(xVehicle.netId) - if entity <= 0 or Entity(entity).state.owner ~= xVehicle.owner then - self:delete() - return false - end - - local plate = ESX.Math.Trim(GetVehicleNumberPlateText(entity)) - if plate ~= xVehicle.plate then + if entity <= 0 or Entity(entity).state.owner ~= xVehicle.owner or Entity(entity).state.plate ~= xVehicle.plate then self:delete() return false end @@ -143,6 +138,7 @@ Core.vehicleClass = { assert(type(plate) == "string", "Expected 'plate' to be a string") local xVehicle = Core.vehicles[self.plate] + Entity(xVehicle.entity).state:set("plate", plate, false) SetVehicleNumberPlateText(xVehicle.entity, plate) xVehicle.plate = plate MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { plate, xVehicle.plate, xVehicle.owner }) From 2babbdda687690aeb9922958218f3410ab61cefc Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:15:39 +0100 Subject: [PATCH 11/69] fix(es_extended/server/classes/vehicle): fix plate not updating in db --- [core]/es_extended/server/classes/vehicle.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index cbc9daa6..68ee4f28 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -140,8 +140,8 @@ Core.vehicleClass = { local xVehicle = Core.vehicles[self.plate] Entity(xVehicle.entity).state:set("plate", plate, false) SetVehicleNumberPlateText(xVehicle.entity, plate) - xVehicle.plate = plate MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { plate, xVehicle.plate, xVehicle.owner }) + xVehicle.plate = plate return true end, From 734c5ec3d558669b3baa5d0d2f7cb46ca062499b Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:21:17 +0100 Subject: [PATCH 12/69] fix(es_extended/server/classes/vehicle): confirm updates to db before reflecting changes in veh obj --- [core]/es_extended/server/classes/vehicle.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 68ee4f28..f12c2366 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -138,9 +138,12 @@ Core.vehicleClass = { assert(type(plate) == "string", "Expected 'plate' to be a string") local xVehicle = Core.vehicles[self.plate] + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { plate, xVehicle.plate, xVehicle.owner }) + if affectedRows <= 0 then + return false + end Entity(xVehicle.entity).state:set("plate", plate, false) SetVehicleNumberPlateText(xVehicle.entity, plate) - MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { plate, xVehicle.plate, xVehicle.owner }) xVehicle.plate = plate return true @@ -152,8 +155,11 @@ Core.vehicleClass = { assert(type(props) == "table", "Expected 'props' to be a table") local xVehicle = Core.vehicles[self.plate] + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(props), xVehicle.plate, xVehicle.owner) + if affectedRows <= 0 then + return false + end Entity(xVehicle.entity).state:set("VehicleProperties", props, true) - MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(props), xVehicle.plate, xVehicle.owner) return true end, @@ -168,9 +174,12 @@ Core.vehicleClass = { return true end + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE owner = ? AND `plate` = ?", { owner, xVehicle.owner, xVehicle.plate }) + if affectedRows <= 0 then + return false + end Entity(xVehicle.entity).state:set("owner", owner, false) xVehicle.owner = owner - MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE `plate` = ?", { owner, xVehicle.plate }) return true end, From 88ad28775fef06ba26a0e12d8be5ee2d0347a5dd Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:25:53 +0100 Subject: [PATCH 13/69] refactor(es_extended/server/classes/vehicle): better variable name & added spacing --- [core]/es_extended/server/classes/vehicle.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index f12c2366..486c096e 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -53,14 +53,14 @@ Core.vehicleClass = { Entity(entity).state:set("owner", owner, false) Entity(entity).state:set("plate", plate, false) - local vehicle = { + local vehicleData = { plate = plate, entity = entity, netId = netId, modelHash = vehicleProps.model, owner = owner, } - Core.vehicles[plate] = vehicle + Core.vehicles[plate] = vehicleData MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = 0 WHERE `owner` = ? AND `plate` = ?", { owner, plate }) @@ -142,6 +142,7 @@ Core.vehicleClass = { if affectedRows <= 0 then return false end + Entity(xVehicle.entity).state:set("plate", plate, false) SetVehicleNumberPlateText(xVehicle.entity, plate) xVehicle.plate = plate @@ -159,6 +160,7 @@ Core.vehicleClass = { if affectedRows <= 0 then return false end + Entity(xVehicle.entity).state:set("VehicleProperties", props, true) return true @@ -178,6 +180,7 @@ Core.vehicleClass = { if affectedRows <= 0 then return false end + Entity(xVehicle.entity).state:set("owner", owner, false) xVehicle.owner = owner From 5656505e006bd2529ae28f51d2326b1c7c7ea6bb Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 12:48:39 +0100 Subject: [PATCH 14/69] refactor(es_extended/server/functions): move GetExtendedVehicleFromPlate plate validation to vehicle class --- [core]/es_extended/server/classes/vehicle.lua | 2 ++ [core]/es_extended/server/functions.lua | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 486c096e..3cd8562d 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -71,6 +71,8 @@ Core.vehicleClass = { return obj end, getFromPlate = function(plate) + assert(type(plate) == "string", "Expected 'plate' to be a string") + if Core.vehicles[plate] then local obj = table.clone(Core.vehicleClass) obj.plate = plate diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 90c5bc4f..f4894ff7 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -627,7 +627,5 @@ end ---@param plate string ---@return VehicleClass? function ESX.GetExtendedVehicleFromPlate(plate) - assert(type(plate) == "string", "Expected 'plate' to be a string") - return Core.vehicleClass.getFromPlate(plate) end \ No newline at end of file From ea668afb3ab94ea7d091f393f786b259274d6bb7 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:15:38 +0100 Subject: [PATCH 15/69] fix(es_extended/server/classes/vehicle): properly object to new vehicle plate --- [core]/es_extended/server/classes/vehicle.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 3cd8562d..22147663 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -147,7 +147,14 @@ Core.vehicleClass = { Entity(xVehicle.entity).state:set("plate", plate, false) SetVehicleNumberPlateText(xVehicle.entity, plate) + + local oldPlate = xVehicle.plate xVehicle.plate = plate + Core.vehicles[plate] = table.clone(xVehicle) + Core.vehicles[self.plate] = nil + + TriggerEvent("esx:changedExtendedVehiclePlate", xVehicle.plate, oldPlate) + Wait(0) return true end, From 203dc9af0252dbd961f059c72edb9a6256458e7a Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:33:56 +0100 Subject: [PATCH 16/69] fix(es_extended/server/classes/vehicle): invalidate vehicle on failed db update --- [core]/es_extended/server/classes/vehicle.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 22147663..fea762d3 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -142,6 +142,7 @@ Core.vehicleClass = { local xVehicle = Core.vehicles[self.plate] local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { plate, xVehicle.plate, xVehicle.owner }) if affectedRows <= 0 then + self:delete() return false end @@ -167,6 +168,7 @@ Core.vehicleClass = { local xVehicle = Core.vehicles[self.plate] local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(props), xVehicle.plate, xVehicle.owner) if affectedRows <= 0 then + self:delete() return false end @@ -187,6 +189,7 @@ Core.vehicleClass = { local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE owner = ? AND `plate` = ?", { owner, xVehicle.owner, xVehicle.plate }) if affectedRows <= 0 then + self:delete() return false end From 0fe26d2455fbb897185e01763275ddae54ba76e9 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:35:41 +0100 Subject: [PATCH 17/69] fix(es_extended/server/classes/vehicle): add owner check in db query --- [core]/es_extended/server/classes/vehicle.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index fea762d3..6c676971 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -209,7 +209,7 @@ Core.vehicleClass = { DeleteEntity(xVehicle.entity) end - MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = 1 WHERE `plate` = ?", { xVehicle.plate }) + MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = 1 WHERE `plate` = ? AND `owner` = ?", { xVehicle.plate, xVehicle.owner }) TriggerEvent("esx:deletedExtendedVehicle", self) Core.vehicles[self.plate] = nil From efc91176401739d7ce3ac9f9c16137a74a5e60c2 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 18:38:06 +0100 Subject: [PATCH 18/69] feat(es_extended/server/classes/vehicle): add support for setting garage/impound on delete --- [core]/es_extended/server/classes/vehicle.lua | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 6c676971..7222bf9f 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -18,7 +18,7 @@ ---@field setPlate fun(self:VehicleClass, plate:string):boolean ---@field setProps fun(self:VehicleClass, props:table):boolean ---@field setOwner fun(self:VehicleClass, owner:string):boolean ----@field delete fun(self:VehicleClass):nil +---@field delete fun(self:VehicleClass, garageName:string?, impound:boolean?):nil Core.vehicleClass = { plate = "", new = function(owner, plate, coords) @@ -198,7 +198,14 @@ Core.vehicleClass = { return true end, - delete = function(self) + delete = function(self, garageName, impound) + if type(garageName) ~= "string" then + garageName = nil + end + if type(impound) ~= "boolean" then + impound = false + end + local xVehicle = Core.vehicles[self.plate] if not xVehicle then return @@ -209,7 +216,19 @@ Core.vehicleClass = { DeleteEntity(xVehicle.entity) end - MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = 1 WHERE `plate` = ? AND `owner` = ?", { xVehicle.plate, xVehicle.owner }) + local query = "UPDATE `owned_vehicles` SET `stored` = true WHERE `plate` = ? AND `owner` = ?" + local queryParams = { xVehicle.plate, xVehicle.owner } + if garageName then + if impound then + query = "UPDATE `owned_vehicles` SET `stored` = true, `parking` = NULL, `pound` = ? WHERE `plate` = ? AND `owner` = ?" + else + query = "UPDATE `owned_vehicles` SET `stored` = true, `pound` = NULL, `parking` = ? WHERE `plate` = ? AND `owner` = ?" + end + + queryParams = { garageName, xVehicle.plate, xVehicle.owner } + end + + MySQL.update.await(query, queryParams) TriggerEvent("esx:deletedExtendedVehicle", self) Core.vehicles[self.plate] = nil From 9c7d7ea26c7a756bd70ec499c466789a2de1384d Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 21 Dec 2024 18:46:36 +0100 Subject: [PATCH 19/69] refactor(es_extended/server/classes/vehicle): better variable naming --- [core]/es_extended/server/classes/vehicle.lua | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 7222bf9f..f900d4d8 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -15,10 +15,10 @@ ---@field getEntity fun(self:VehicleClass):number? ---@field getModelHash fun(self:VehicleClass):number? ---@field getOwner fun(self:VehicleClass):string? ----@field setPlate fun(self:VehicleClass, plate:string):boolean +---@field setPlate fun(self:VehicleClass, newPlate:string):boolean ---@field setProps fun(self:VehicleClass, props:table):boolean ----@field setOwner fun(self:VehicleClass, owner:string):boolean ----@field delete fun(self:VehicleClass, garageName:string?, impound:boolean?):nil +---@field setOwner fun(self:VehicleClass, newOwner:string):boolean +---@field delete fun(self:VehicleClass, garageName:string?, isImpound:boolean?):nil Core.vehicleClass = { plate = "", new = function(owner, plate, coords) @@ -133,26 +133,26 @@ Core.vehicleClass = { return Core.vehicles[self.plate].owner end, - setPlate = function(self, plate) + setPlate = function(self, newPlate) if not self:isValid() then return false end - assert(type(plate) == "string", "Expected 'plate' to be a string") + assert(type(newPlate) == "string", "Expected 'plate' to be a string") local xVehicle = Core.vehicles[self.plate] - local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { plate, xVehicle.plate, xVehicle.owner }) + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { newPlate, xVehicle.plate, xVehicle.owner }) if affectedRows <= 0 then self:delete() return false end - Entity(xVehicle.entity).state:set("plate", plate, false) - SetVehicleNumberPlateText(xVehicle.entity, plate) + Entity(xVehicle.entity).state:set("plate", newPlate, false) + SetVehicleNumberPlateText(xVehicle.entity, newPlate) local oldPlate = xVehicle.plate - xVehicle.plate = plate - Core.vehicles[plate] = table.clone(xVehicle) - Core.vehicles[self.plate] = nil + xVehicle.plate = newPlate + Core.vehicles[newPlate] = table.clone(xVehicle) + Core.vehicles[oldPlate] = nil TriggerEvent("esx:changedExtendedVehiclePlate", xVehicle.plate, oldPlate) Wait(0) @@ -176,34 +176,34 @@ Core.vehicleClass = { return true end, - setOwner = function(self, owner) + setOwner = function(self, newOwner) if not self:isValid() then return false end - assert(type(owner) == "string", "Expected 'owner' to be a string") + assert(type(newOwner) == "string", "Expected 'owner' to be a string") local xVehicle = Core.vehicles[self.plate] - if xVehicle.owner == owner then + if xVehicle.owner == newOwner then return true end - local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE owner = ? AND `plate` = ?", { owner, xVehicle.owner, xVehicle.plate }) + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE owner = ? AND `plate` = ?", { newOwner, xVehicle.owner, xVehicle.plate }) if affectedRows <= 0 then self:delete() return false end - Entity(xVehicle.entity).state:set("owner", owner, false) - xVehicle.owner = owner + Entity(xVehicle.entity).state:set("owner", newOwner, false) + xVehicle.owner = newOwner return true end, - delete = function(self, garageName, impound) + delete = function(self, garageName, isImpound) if type(garageName) ~= "string" then garageName = nil end - if type(impound) ~= "boolean" then - impound = false + if type(isImpound) ~= "boolean" then + isImpound = false end local xVehicle = Core.vehicles[self.plate] @@ -219,7 +219,7 @@ Core.vehicleClass = { local query = "UPDATE `owned_vehicles` SET `stored` = true WHERE `plate` = ? AND `owner` = ?" local queryParams = { xVehicle.plate, xVehicle.owner } if garageName then - if impound then + if isImpound then query = "UPDATE `owned_vehicles` SET `stored` = true, `parking` = NULL, `pound` = ? WHERE `plate` = ? AND `owner` = ?" else query = "UPDATE `owned_vehicles` SET `stored` = true, `pound` = NULL, `parking` = ? WHERE `plate` = ? AND `owner` = ?" From ac7aa3f0b18669b95332b241c37f4f1619c5bbaa Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:01:02 +0100 Subject: [PATCH 20/69] refactor(es_extended/server/classes/vehicle): rename classes --- [core]/es_extended/server/classes/vehicle.lua | 36 +++++++++---------- [core]/es_extended/server/common.lua | 2 +- [core]/es_extended/server/functions.lua | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index f900d4d8..025b86da 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -1,24 +1,24 @@ ----@class VehicleData +---@class CVehicleData ---@field plate string ---@field netId number ---@field entity number ---@field modelHash number ---@field owner string ----@class VehicleClass +---@class CExtendedVehicle ---@field plate string ----@field isValid fun(self:VehicleClass):boolean ----@field new fun(owner:string, plate:string, coords:vector4): VehicleClass? ----@field getFromPlate fun(plate:string):VehicleClass? ----@field getPlate fun(self:VehicleClass):string? ----@field getNetId fun(self:VehicleClass):number? ----@field getEntity fun(self:VehicleClass):number? ----@field getModelHash fun(self:VehicleClass):number? ----@field getOwner fun(self:VehicleClass):string? ----@field setPlate fun(self:VehicleClass, newPlate:string):boolean ----@field setProps fun(self:VehicleClass, props:table):boolean ----@field setOwner fun(self:VehicleClass, newOwner:string):boolean ----@field delete fun(self:VehicleClass, garageName:string?, isImpound:boolean?):nil +---@field isValid fun(self:CExtendedVehicle):boolean +---@field new fun(owner:string, plate:string, coords:vector4): CExtendedVehicle? +---@field getFromPlate fun(plate:string):CExtendedVehicle? +---@field getPlate fun(self:CExtendedVehicle):string? +---@field getNetId fun(self:CExtendedVehicle):number? +---@field getEntity fun(self:CExtendedVehicle):number? +---@field getModelHash fun(self:CExtendedVehicle):number? +---@field getOwner fun(self:CExtendedVehicle):string? +---@field setPlate fun(self:CExtendedVehicle, newPlate:string):boolean +---@field setProps fun(self:CExtendedVehicle, newProps:table):boolean +---@field setOwner fun(self:CExtendedVehicle, newOwner:string):boolean +---@field delete fun(self:CExtendedVehicle, garageName:string?, isImpound:boolean?):nil Core.vehicleClass = { plate = "", new = function(owner, plate, coords) @@ -159,20 +159,20 @@ Core.vehicleClass = { return true end, - setProps = function(self, props) + setProps = function(self, newProps) if not self:isValid() then return false end - assert(type(props) == "table", "Expected 'props' to be a table") + assert(type(newProps) == "table", "Expected 'props' to be a table") local xVehicle = Core.vehicles[self.plate] - local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(props), xVehicle.plate, xVehicle.owner) + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(newProps), xVehicle.plate, xVehicle.owner) if affectedRows <= 0 then self:delete() return false end - Entity(xVehicle.entity).state:set("VehicleProperties", props, true) + Entity(xVehicle.entity).state:set("VehicleProperties", newProps, true) return true end, diff --git a/[core]/es_extended/server/common.lua b/[core]/es_extended/server/common.lua index 2e6845c4..9c95c571 100644 --- a/[core]/es_extended/server/common.lua +++ b/[core]/es_extended/server/common.lua @@ -11,7 +11,7 @@ Core.PlayerFunctionOverrides = {} Core.DatabaseConnected = false Core.playersByIdentifier = {} ----@type table +---@type table Core.vehicles = {} Core.vehicleTypesByModel = {} diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index f4894ff7..ae052f72 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -619,13 +619,13 @@ end ---@param owner string ---@param plate string ---@param coords vector4 ----@return VehicleClass? +---@return CExtendedVehicle? function ESX.CreateExtendedVehicle(owner, plate, coords) return Core.vehicleClass.new(owner, plate, coords) end ---@param plate string ----@return VehicleClass? +---@return CExtendedVehicle? function ESX.GetExtendedVehicleFromPlate(plate) return Core.vehicleClass.getFromPlate(plate) end \ No newline at end of file From 9635d4774782bff0688f46cf3481fb3846cb37d9 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:13:39 +0100 Subject: [PATCH 21/69] fix(es_extended/server/classes/vehicle): properly annotate vehicleData type --- [core]/es_extended/server/classes/vehicle.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 025b86da..1d498cd7 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -53,6 +53,7 @@ Core.vehicleClass = { Entity(entity).state:set("owner", owner, false) Entity(entity).state:set("plate", plate, false) + ---@type CVehicleData local vehicleData = { plate = plate, entity = entity, From 738e0ea0fe59d378c42ddad0690b26901d990456 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:17:41 +0100 Subject: [PATCH 22/69] refactor(es_extended/server/classes/vehicle): rename xVehicle to vehicleData where appropriate Avoids confusion. --- [core]/es_extended/server/classes/vehicle.lua | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index 1d498cd7..ac9feca8 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -84,18 +84,18 @@ Core.vehicleClass = { end end, isValid = function(self) - local xVehicle = Core.vehicles[self.plate] - if not xVehicle then + local vehicleData = Core.vehicles[self.plate] + if not vehicleData then return false end - local entity = NetworkGetEntityFromNetworkId(xVehicle.netId) - if entity <= 0 or Entity(entity).state.owner ~= xVehicle.owner or Entity(entity).state.plate ~= xVehicle.plate then + local entity = NetworkGetEntityFromNetworkId(vehicleData.netId) + if entity <= 0 or Entity(entity).state.owner ~= vehicleData.owner or Entity(entity).state.plate ~= vehicleData.plate then self:delete() return false end - xVehicle.entity = entity + vehicleData.entity = entity return true end, @@ -140,22 +140,22 @@ Core.vehicleClass = { end assert(type(newPlate) == "string", "Expected 'plate' to be a string") - local xVehicle = Core.vehicles[self.plate] - local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { newPlate, xVehicle.plate, xVehicle.owner }) + local vehicleData = Core.vehicles[self.plate] + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `plate` = ? WHERE `plate` = ? AND `owner` = ?", { newPlate, vehicleData.plate, vehicleData.owner }) if affectedRows <= 0 then self:delete() return false end - Entity(xVehicle.entity).state:set("plate", newPlate, false) - SetVehicleNumberPlateText(xVehicle.entity, newPlate) + Entity(vehicleData.entity).state:set("plate", newPlate, false) + SetVehicleNumberPlateText(vehicleData.entity, newPlate) - local oldPlate = xVehicle.plate - xVehicle.plate = newPlate - Core.vehicles[newPlate] = table.clone(xVehicle) + local oldPlate = vehicleData.plate + vehicleData.plate = newPlate + Core.vehicles[newPlate] = table.clone(vehicleData) Core.vehicles[oldPlate] = nil - TriggerEvent("esx:changedExtendedVehiclePlate", xVehicle.plate, oldPlate) + TriggerEvent("esx:changedExtendedVehiclePlate", vehicleData.plate, oldPlate) Wait(0) return true @@ -166,14 +166,14 @@ Core.vehicleClass = { end assert(type(newProps) == "table", "Expected 'props' to be a table") - local xVehicle = Core.vehicles[self.plate] - local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(newProps), xVehicle.plate, xVehicle.owner) + local vehicleData = Core.vehicles[self.plate] + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `vehicle` = ? WHERE `plate` = ? AND `owner` = ?", json.encode(newProps), vehicleData.plate, vehicleData.owner) if affectedRows <= 0 then self:delete() return false end - Entity(xVehicle.entity).state:set("VehicleProperties", newProps, true) + Entity(vehicleData.entity).state:set("VehicleProperties", newProps, true) return true end, @@ -183,19 +183,19 @@ Core.vehicleClass = { end assert(type(newOwner) == "string", "Expected 'owner' to be a string") - local xVehicle = Core.vehicles[self.plate] - if xVehicle.owner == newOwner then + local vehicleData = Core.vehicles[self.plate] + if vehicleData.owner == newOwner then return true end - local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE owner = ? AND `plate` = ?", { newOwner, xVehicle.owner, xVehicle.plate }) + local affectedRows = MySQL.update.await("UPDATE `owned_vehicles` SET `owner` = ? WHERE owner = ? AND `plate` = ?", { newOwner, vehicleData.owner, vehicleData.plate }) if affectedRows <= 0 then self:delete() return false end - Entity(xVehicle.entity).state:set("owner", newOwner, false) - xVehicle.owner = newOwner + Entity(vehicleData.entity).state:set("owner", newOwner, false) + vehicleData.owner = newOwner return true end, @@ -207,18 +207,18 @@ Core.vehicleClass = { isImpound = false end - local xVehicle = Core.vehicles[self.plate] - if not xVehicle then + local vehicleData = Core.vehicles[self.plate] + if not vehicleData then return end - local entity = NetworkGetEntityFromNetworkId(xVehicle.netId) - if entity >= 0 and Entity(entity).state.owner == xVehicle.owner then - DeleteEntity(xVehicle.entity) + local entity = NetworkGetEntityFromNetworkId(vehicleData.netId) + if entity >= 0 and Entity(entity).state.owner == vehicleData.owner then + DeleteEntity(vehicleData.entity) end local query = "UPDATE `owned_vehicles` SET `stored` = true WHERE `plate` = ? AND `owner` = ?" - local queryParams = { xVehicle.plate, xVehicle.owner } + local queryParams = { vehicleData.plate, vehicleData.owner } if garageName then if isImpound then query = "UPDATE `owned_vehicles` SET `stored` = true, `parking` = NULL, `pound` = ? WHERE `plate` = ? AND `owner` = ?" @@ -226,7 +226,7 @@ Core.vehicleClass = { query = "UPDATE `owned_vehicles` SET `stored` = true, `pound` = NULL, `parking` = ? WHERE `plate` = ? AND `owner` = ?" end - queryParams = { garageName, xVehicle.plate, xVehicle.owner } + queryParams = { garageName, vehicleData.plate, vehicleData.owner } end MySQL.update.await(query, queryParams) From a812285e3c251f7e0865186d73cb1b32726e9c37 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:39:16 +0100 Subject: [PATCH 23/69] refactor(es_extended/server/classes/vehicle): refactory query --- [core]/es_extended/server/classes/vehicle.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/classes/vehicle.lua b/[core]/es_extended/server/classes/vehicle.lua index ac9feca8..b85c8f65 100644 --- a/[core]/es_extended/server/classes/vehicle.lua +++ b/[core]/es_extended/server/classes/vehicle.lua @@ -63,7 +63,7 @@ Core.vehicleClass = { } Core.vehicles[plate] = vehicleData - MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = 0 WHERE `owner` = ? AND `plate` = ?", { owner, plate }) + MySQL.update.await("UPDATE `owned_vehicles` SET `stored` = false WHERE `owner` = ? AND `plate` = ?", { owner, plate }) local obj = table.clone(Core.vehicleClass) obj.plate = plate From 968c55880491e1f4b35a56dbf756bd7b673a28d0 Mon Sep 17 00:00:00 2001 From: Kasey FItton Date: Wed, 8 Jan 2025 12:31:50 +0000 Subject: [PATCH 24/69] chore: update copyright year --- [core]/cron/LICENSE | 4 +- [core]/cron/README.md | 2 +- [core]/es_extended/LICENSE | 4 +- [core]/es_extended/README.md | 2 +- [core]/esx_chat_theme/README.md | 2 +- [core]/esx_context/LICENSE | 4 +- [core]/esx_context/README.md | 2 +- [core]/esx_identity/LICENSE | 4 +- [core]/esx_identity/README.md | 2 +- [core]/esx_loadingscreen/LICENSE | 4 +- [core]/esx_loadingscreen/README.md | 2 +- [core]/esx_menu_default/LICENSE | 4 +- [core]/esx_menu_default/README.md | 2 +- [core]/esx_menu_dialog/LICENSE | 4 +- [core]/esx_menu_dialog/README.md | 4 +- [core]/esx_menu_list/LICENSE | 4 +- [core]/esx_menu_list/README.md | 4 +- [core]/esx_multicharacter/LICENSE.md | 4 +- [core]/esx_multicharacter/readme.md | 2 +- [core]/esx_notify/LICENSE | 4 +- [core]/esx_notify/readme.md | 2 +- [core]/esx_progressbar/LICENSE | 1348 +++++++++++++------------- [core]/esx_progressbar/readme.md | 30 +- [core]/esx_skin/LICENSE | 4 +- [core]/esx_skin/README.md | 2 +- [core]/esx_textui/LICENSE | 4 +- [core]/esx_textui/readme.md | 2 +- [core]/skinchanger/LICENSE | 4 +- [core]/skinchanger/README.md | 2 +- 29 files changed, 731 insertions(+), 731 deletions(-) diff --git a/[core]/cron/LICENSE b/[core]/cron/LICENSE index 9ef14b9d..4defadc1 100644 --- a/[core]/cron/LICENSE +++ b/[core]/cron/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. cron - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - cron Copyright (C) 2015-2024 Jérémie N'gadi + cron Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/cron/README.md b/[core]/cron/README.md index df2e5eeb..77507c5a 100644 --- a/[core]/cron/README.md +++ b/[core]/cron/README.md @@ -28,7 +28,7 @@ TriggerEvent('cron:runAt', 18, 30, CronTask) cron - run tasks at specific intervals! -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/es_extended/LICENSE b/[core]/es_extended/LICENSE index 5f5e070b..d5b048d4 100644 --- a/[core]/es_extended/LICENSE +++ b/[core]/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. es_extended - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - es_extended Copyright (C) 2015-2024 Jérémie N'gadi + es_extended Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/es_extended/README.md b/[core]/es_extended/README.md index 32ae43b8..5c13688a 100644 --- a/[core]/es_extended/README.md +++ b/[core]/es_extended/README.md @@ -4,7 +4,7 @@ es_extended -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_chat_theme/README.md b/[core]/esx_chat_theme/README.md index 1d149d4a..a87e8af7 100644 --- a/[core]/esx_chat_theme/README.md +++ b/[core]/esx_chat_theme/README.md @@ -6,7 +6,7 @@ A ESX-Based Chat-theme for your server esx_chat_theme - ESX Chat Theme -Copyright (C) 2024 Jérémie N'gadi +Copyright (C) 2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_context/LICENSE b/[core]/esx_context/LICENSE index dae70ee4..d73da6ba 100644 --- a/[core]/esx_context/LICENSE +++ b/[core]/esx_context/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. esx_context - Copyright (C) 2022-2024 ESX Framework + Copyright (C) 2022-2025 ESX Framework 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: - esx_context Copyright (C) 2022-2024 ESX Framework + esx_context Copyright (C) 2022-2025 ESX Framework 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/[core]/esx_context/README.md b/[core]/esx_context/README.md index 6b6a53de..9acc04e9 100644 --- a/[core]/esx_context/README.md +++ b/[core]/esx_context/README.md @@ -6,7 +6,7 @@ A elegant, easy to use Context Menu system to make User Interactions clean and h esx_context -Copyright (C) 2022-2024 ESX Framework +Copyright (C) 2022-2025 ESX Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_identity/LICENSE b/[core]/esx_identity/LICENSE index e57012ae..0466d652 100644 --- a/[core]/esx_identity/LICENSE +++ b/[core]/esx_identity/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. esx_identity - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - esx_identity Copyright (C) 2015-2024 Jérémie N'gadi + esx_identity Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/esx_identity/README.md b/[core]/esx_identity/README.md index c0637081..2b9618c9 100644 --- a/[core]/esx_identity/README.md +++ b/[core]/esx_identity/README.md @@ -21,7 +21,7 @@ A Core Resource that Allows the player to Pick their characters, Name, Gender, H esx_identity - Make your Character a Person! -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_loadingscreen/LICENSE b/[core]/esx_loadingscreen/LICENSE index 79832f23..80785a16 100644 --- a/[core]/esx_loadingscreen/LICENSE +++ b/[core]/esx_loadingscreen/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. esx_loadingscreen - Copyright (C) 2020-2024 ESX Framework + Copyright (C) 2020-2025 ESX Framework 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: - esx_loadingscreen Copyright (C) 2020-2024 ESX Framework + esx_loadingscreen Copyright (C) 2020-2025 ESX Framework 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/[core]/esx_loadingscreen/README.md b/[core]/esx_loadingscreen/README.md index 366c5ada..0e39378e 100644 --- a/[core]/esx_loadingscreen/README.md +++ b/[core]/esx_loadingscreen/README.md @@ -6,7 +6,7 @@ A simple but beautiful Loading Screen for your server! esx_loadingscreen - Loading in style! -Copyright (C) 2020-2024 ESX Framework +Copyright (C) 2020-2025 ESX Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_menu_default/LICENSE b/[core]/esx_menu_default/LICENSE index 8eef124b..e4c61364 100644 --- a/[core]/esx_menu_default/LICENSE +++ b/[core]/esx_menu_default/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. esx_menu_default - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi + esx_menu_default Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/esx_menu_default/README.md b/[core]/esx_menu_default/README.md index 29e07d1f..8a6bd80f 100644 --- a/[core]/esx_menu_default/README.md +++ b/[core]/esx_menu_default/README.md @@ -9,7 +9,7 @@ A default List type menu for ESX. esx_menu_default - Default Menu! -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_menu_dialog/LICENSE b/[core]/esx_menu_dialog/LICENSE index 7b3fd1a9..625326fe 100644 --- a/[core]/esx_menu_dialog/LICENSE +++ b/[core]/esx_menu_dialog/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. esx_menu_dialog - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - esx_menu_dialog Copyright (C) 2015-2024 Jérémie N'gadi + esx_menu_dialog Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/esx_menu_dialog/README.md b/[core]/esx_menu_dialog/README.md index 038f95f7..6817fcd8 100644 --- a/[core]/esx_menu_dialog/README.md +++ b/[core]/esx_menu_dialog/README.md @@ -12,10 +12,10 @@ start esx_menu_dialog ### License esx_menu_dialog - input dialog for ESX -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. -You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. \ No newline at end of file +You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. diff --git a/[core]/esx_menu_list/LICENSE b/[core]/esx_menu_list/LICENSE index b56c9231..455eebc8 100644 --- a/[core]/esx_menu_list/LICENSE +++ b/[core]/esx_menu_list/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. esx_menu_list - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - esx_menu_list Copyright (C) 2015-2024 Jérémie N'gadi + esx_menu_list Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/esx_menu_list/README.md b/[core]/esx_menu_list/README.md index 9b829283..9fd8fc26 100644 --- a/[core]/esx_menu_list/README.md +++ b/[core]/esx_menu_list/README.md @@ -5,10 +5,10 @@ Advanced menu inputs for ESX ### License esx_menu_list - advanced menu inputs for ESX -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. -You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. \ No newline at end of file +You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. diff --git a/[core]/esx_multicharacter/LICENSE.md b/[core]/esx_multicharacter/LICENSE.md index e23434ea..45ddb022 100644 --- a/[core]/esx_multicharacter/LICENSE.md +++ b/[core]/esx_multicharacter/LICENSE.md @@ -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. esx_multicharacter - Copyright (C) 2022-2024 ESX Framework, Linden, KASH + Copyright (C) 2022-2025 ESX Framework, Linden, KASH 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: - esx_multicharacter Copyright (C) 2022-2024 ESX Framework, Linden, KASH + esx_multicharacter Copyright (C) 2022-2025 ESX Framework, Linden, KASH 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/[core]/esx_multicharacter/readme.md b/[core]/esx_multicharacter/readme.md index 2517728e..eb2ffa6b 100644 --- a/[core]/esx_multicharacter/readme.md +++ b/[core]/esx_multicharacter/readme.md @@ -21,7 +21,7 @@ A Simplistic system, that allows Players to have multiple Characters, which can Official Multi-Character system for ESX Legacy -Copyright © 2022-2024 Linden, ESX-Framework and KASH +Copyright © 2022-2025 Linden, ESX-Framework and KASH 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 diff --git a/[core]/esx_notify/LICENSE b/[core]/esx_notify/LICENSE index a7568793..28d1db85 100644 --- a/[core]/esx_notify/LICENSE +++ b/[core]/esx_notify/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. esx_notify - Copyright (C) 2022-2024 ESX Framework + Copyright (C) 2022-2025 ESX Framework 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: - esx_notify Copyright (C) 2022-2024 ESX Framework + esx_notify Copyright (C) 2022-2025 ESX Framework 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/[core]/esx_notify/readme.md b/[core]/esx_notify/readme.md index f6bc4c9d..621b89f7 100644 --- a/[core]/esx_notify/readme.md +++ b/[core]/esx_notify/readme.md @@ -55,7 +55,7 @@ ESX.ShowNotification("I i ~r~love~s~ donuts", "success", 3000) esx_notify- Notify! -Copyright (C) 2022-2024 ESX-Framework +Copyright (C) 2022-2025 ESX-Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_progressbar/LICENSE b/[core]/esx_progressbar/LICENSE index e3013ae2..28d1db85 100644 --- a/[core]/esx_progressbar/LICENSE +++ b/[core]/esx_progressbar/LICENSE @@ -1,674 +1,674 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -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. - - esx_notify - Copyright (C) 2022-2024 ESX Framework - - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -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: - - esx_notify Copyright (C) 2022-2024 ESX Framework - 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. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + esx_notify + Copyright (C) 2022-2025 ESX Framework + + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +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: + + esx_notify Copyright (C) 2022-2025 ESX Framework + 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. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/[core]/esx_progressbar/readme.md b/[core]/esx_progressbar/readme.md index a3daddfe..91ec2123 100644 --- a/[core]/esx_progressbar/readme.md +++ b/[core]/esx_progressbar/readme.md @@ -3,12 +3,12 @@ * ESX Function ```lua ESX.Progressbar("test", 25000,{ - FreezePlayer = false, + FreezePlayer = false, animation ={ type = "anim", - dict = "mini@prostitutes@sexlow_veh", - lib ="low_car_sex_to_prop_p2_player" - }, + dict = "mini@prostitutes@sexlow_veh", + lib ="low_car_sex_to_prop_p2_player" + }, onFinish = function() --Code here end}) @@ -16,13 +16,13 @@ ``` * Export - + ```lua exports["esx_progressbar"]:Progressbar("Unlocking Storage", 3000,{ - FreezePlayer = true, + FreezePlayer = true, animation ={ type = "anim", - dict = "anim@mp_player_intmenu@key_fob@", + dict = "anim@mp_player_intmenu@key_fob@", lib ="fob_click" }, onFinish = function() @@ -31,13 +31,13 @@ ``` * Cancel - + ```lua ESX.Progressbar("Unlocking Storage", 3000,{ - FreezePlayer = true, + FreezePlayer = true, animation ={ type = "anim", - dict = "anim@mp_player_intmenu@key_fob@", + dict = "anim@mp_player_intmenu@key_fob@", lib ="fob_click" }, onFinish = function() @@ -49,13 +49,13 @@ ``` * Scenario - + ```lua ESX.Progressbar("Unlocking Storage", 3000,{ - FreezePlayer = true, + FreezePlayer = true, animation ={ type = "Scenario", - Scenario = "PROP_HUMAN_BUM_BIN", + Scenario = "PROP_HUMAN_BUM_BIN", }, onFinish = function() --Code here @@ -69,10 +69,10 @@ esx_progressbar -Copyright (C) 2022-2024 ESX-Framework +Copyright (C) 2022-2025 ESX-Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. -You should have received a copy Of the GNU General Public License along with this program. If Not, see . \ No newline at end of file +You should have received a copy Of the GNU General Public License along with this program. If Not, see . diff --git a/[core]/esx_skin/LICENSE b/[core]/esx_skin/LICENSE index 78332fdb..39517c08 100644 --- a/[core]/esx_skin/LICENSE +++ b/[core]/esx_skin/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. esx_skin - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - esx_skin Copyright (C) 2015-2024 Jérémie N'gadi + esx_skin Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/esx_skin/README.md b/[core]/esx_skin/README.md index e004178c..57c091b3 100644 --- a/[core]/esx_skin/README.md +++ b/[core]/esx_skin/README.md @@ -32,7 +32,7 @@ start esx_skin ### License esx_skin - skin selector for ESX -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_textui/LICENSE b/[core]/esx_textui/LICENSE index cf001768..77dc202c 100644 --- a/[core]/esx_textui/LICENSE +++ b/[core]/esx_textui/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. esx_textui - Copyright (C) 2015-2024 ESX Framework + Copyright (C) 2015-2025 ESX Framework 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: - esx_textui Copyright (C) 2022-2024 ESX Framework + esx_textui Copyright (C) 2022-2025 ESX Framework 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/[core]/esx_textui/readme.md b/[core]/esx_textui/readme.md index 922e11a8..bdd3bda8 100644 --- a/[core]/esx_textui/readme.md +++ b/[core]/esx_textui/readme.md @@ -43,7 +43,7 @@ ESX.TextUI("i ~r~love~s~ donuts", "error") esx_textui - Persistent Notifications -Copyright (C) 2022-2024 ESX Framework +Copyright (C) 2022-2025 ESX Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/skinchanger/LICENSE b/[core]/skinchanger/LICENSE index 89a184fc..bcb2e5ff 100644 --- a/[core]/skinchanger/LICENSE +++ b/[core]/skinchanger/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. skinchanger - Copyright (C) 2015-2024 Jérémie N'gadi + Copyright (C) 2015-2025 Jérémie N'gadi 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: - skinchanger Copyright (C) 2015-2024 Jérémie N'gadi + skinchanger Copyright (C) 2015-2025 Jérémie N'gadi 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/[core]/skinchanger/README.md b/[core]/skinchanger/README.md index 7b1b3dd6..141c344f 100644 --- a/[core]/skinchanger/README.md +++ b/[core]/skinchanger/README.md @@ -73,7 +73,7 @@ end) skinchanger - Own your skin! -Copyright (C) 2015-2024 Jérémie N'gadi +Copyright (C) 2015-2025 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. From 97aaf58a021ba4dd2ce2fa6daf17f43a94eb5b4a Mon Sep 17 00:00:00 2001 From: Arctos2win <116841243+Arctos2win@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:17:39 +0100 Subject: [PATCH 25/69] Revert "chore: update copyright year" --- .github/pull_request_template.md | 22 - [core]/cron/LICENSE | 4 +- [core]/cron/README.md | 2 +- [core]/cron/fxmanifest.lua | 2 +- [core]/es_extended/LICENSE | 4 +- [core]/es_extended/README.md | 2 +- .../es_extended/client/modules/scaleform.lua | 84 +- [core]/es_extended/fxmanifest.lua | 2 +- [core]/esx_chat_theme/README.md | 2 +- [core]/esx_chat_theme/fxmanifest.lua | 2 +- [core]/esx_context/LICENSE | 4 +- [core]/esx_context/README.md | 2 +- [core]/esx_context/fxmanifest.lua | 2 +- [core]/esx_identity/LICENSE | 4 +- [core]/esx_identity/README.md | 2 +- [core]/esx_identity/fxmanifest.lua | 2 +- [core]/esx_loadingscreen/LICENSE | 4 +- [core]/esx_loadingscreen/README.md | 2 +- [core]/esx_loadingscreen/fxmanifest.lua | 2 +- [core]/esx_menu_default/LICENSE | 4 +- [core]/esx_menu_default/README.md | 2 +- [core]/esx_menu_default/fxmanifest.lua | 2 +- [core]/esx_menu_dialog/LICENSE | 4 +- [core]/esx_menu_dialog/README.md | 4 +- [core]/esx_menu_dialog/fxmanifest.lua | 2 +- [core]/esx_menu_list/LICENSE | 4 +- [core]/esx_menu_list/README.md | 4 +- [core]/esx_menu_list/fxmanifest.lua | 2 +- [core]/esx_multicharacter/LICENSE.md | 4 +- [core]/esx_multicharacter/fxmanifest.lua | 2 +- [core]/esx_multicharacter/readme.md | 2 +- [core]/esx_notify/LICENSE | 4 +- [core]/esx_notify/fxmanifest.lua | 2 +- [core]/esx_notify/readme.md | 2 +- [core]/esx_progressbar/LICENSE | 1348 ++++++++--------- [core]/esx_progressbar/fxmanifest.lua | 2 +- [core]/esx_progressbar/readme.md | 30 +- [core]/esx_skin/LICENSE | 4 +- [core]/esx_skin/README.md | 2 +- [core]/esx_skin/fxmanifest.lua | 2 +- [core]/esx_textui/LICENSE | 4 +- [core]/esx_textui/fxmanifest.lua | 2 +- [core]/esx_textui/readme.md | 2 +- [core]/skinchanger/LICENSE | 4 +- [core]/skinchanger/README.md | 2 +- [core]/skinchanger/fxmanifest.lua | 2 +- 46 files changed, 789 insertions(+), 809 deletions(-) delete mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 30db5c2b..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,22 +0,0 @@ -### Description - - ---- -### Motivation - - ---- - -### **Implementation Details** - ---- - -### Usage Example - ---- - -### PR Checklist -- [] My commit messages and PR title follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard. -- [] My changes have been tested locally and function as expected. -- [] My PR does not introduce any breaking changes. -- [] I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context. diff --git a/[core]/cron/LICENSE b/[core]/cron/LICENSE index 4defadc1..9ef14b9d 100644 --- a/[core]/cron/LICENSE +++ b/[core]/cron/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. cron - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - cron Copyright (C) 2015-2025 Jérémie N'gadi + cron Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/cron/README.md b/[core]/cron/README.md index 77507c5a..df2e5eeb 100644 --- a/[core]/cron/README.md +++ b/[core]/cron/README.md @@ -28,7 +28,7 @@ TriggerEvent('cron:runAt', 18, 30, CronTask) cron - run tasks at specific intervals! -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/cron/fxmanifest.lua b/[core]/cron/fxmanifest.lua index db502695..200cf33f 100644 --- a/[core]/cron/fxmanifest.lua +++ b/[core]/cron/fxmanifest.lua @@ -4,6 +4,6 @@ game 'gta5' author 'ESX-Framework' description 'Allows resources to Run tasks at specific intervals.' lua54 'yes' -version '1.12.3' +version '1.12.2' server_script 'server/main.lua' diff --git a/[core]/es_extended/LICENSE b/[core]/es_extended/LICENSE index d5b048d4..5f5e070b 100644 --- a/[core]/es_extended/LICENSE +++ b/[core]/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. es_extended - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - es_extended Copyright (C) 2015-2025 Jérémie N'gadi + es_extended Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/es_extended/README.md b/[core]/es_extended/README.md index 5c13688a..32ae43b8 100644 --- a/[core]/es_extended/README.md +++ b/[core]/es_extended/README.md @@ -4,7 +4,7 @@ es_extended -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/es_extended/client/modules/scaleform.lua b/[core]/es_extended/client/modules/scaleform.lua index 66479685..31d0897e 100644 --- a/[core]/es_extended/client/modules/scaleform.lua +++ b/[core]/es_extended/client/modules/scaleform.lua @@ -2,12 +2,7 @@ ESX.Scaleform = {} ESX.Scaleform.Utils = {} function ESX.Scaleform.ShowFreemodeMessage(title, msg, sec) - local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("MP_BIG_MESSAGE_FREEMODE") - - BeginScaleformMovieMethod(scaleform, "SHOW_SHARD_WASTED_MP_MESSAGE") - ScaleformMovieMethodAddParamTextureNameString(title) - ScaleformMovieMethodAddParamTextureNameString(msg) - EndScaleformMovieMethod() + local scaleform = ESX.Scaleform.Utils.RunMethod("MP_BIG_MESSAGE_FREEMODE", "SHOW_SHARD_WASTED_MP_MESSAGE", false, title, msg) while sec > 0 do Wait(0) @@ -20,25 +15,9 @@ function ESX.Scaleform.ShowFreemodeMessage(title, msg, sec) end function ESX.Scaleform.ShowBreakingNews(title, msg, bottom, sec) - local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("BREAKING_NEWS") - - BeginScaleformMovieMethod(scaleform, "SET_TEXT") - ScaleformMovieMethodAddParamTextureNameString(msg) - ScaleformMovieMethodAddParamTextureNameString(bottom) - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(scaleform, "SET_SCROLL_TEXT") - ScaleformMovieMethodAddParamInt(0) -- top ticker - ScaleformMovieMethodAddParamInt(0) -- Since this is the first string, start at 0 - ScaleformMovieMethodAddParamTextureNameString(title) - - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(scaleform, "DISPLAY_SCROLL_TEXT") - ScaleformMovieMethodAddParamInt(0) -- Top ticker - ScaleformMovieMethodAddParamInt(0) -- Index of string - - EndScaleformMovieMethod() + local scaleform = ESX.Scaleform.Utils.RunMethod("BREAKING_NEWS", "SET_TEXT", false, msg, bottom) + ESX.Scaleform.Utils.RunMethod(scaleform, "SET_SCROLL_TEXT", false, 0, 0, title) + ESX.Scaleform.Utils.RunMethod(scaleform, "DISPLAY_SCROLL_TEXT", false, 0, 0) while sec > 0 do Wait(0) @@ -51,17 +30,7 @@ function ESX.Scaleform.ShowBreakingNews(title, msg, bottom, sec) end function ESX.Scaleform.ShowPopupWarning(title, msg, bottom, sec) - local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("POPUP_WARNING") - - BeginScaleformMovieMethod(scaleform, "SHOW_POPUP_WARNING") - - ScaleformMovieMethodAddParamFloat(500.0) -- black background - ScaleformMovieMethodAddParamTextureNameString(title) - ScaleformMovieMethodAddParamTextureNameString(msg) - ScaleformMovieMethodAddParamTextureNameString(bottom) - ScaleformMovieMethodAddParamBool(true) - - EndScaleformMovieMethod() + local scaleform = ESX.Scaleform.Utils.RunMethod("POPUP_WARNING", "SHOW_POPUP_WARNING", false, 500.0, title, msg, bottom, true) while sec > 0 do Wait(0) @@ -74,11 +43,7 @@ function ESX.Scaleform.ShowPopupWarning(title, msg, bottom, sec) end function ESX.Scaleform.ShowTrafficMovie(sec) - local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("TRAFFIC_CAM") - - BeginScaleformMovieMethod(scaleform, "PLAY_CAM_MOVIE") - - EndScaleformMovieMethod() + local scaleform = ESX.Scaleform.Utils.RunMethod("TRAFFIC_CAM", "PLAY_CAM_MOVIE", false) while sec > 0 do Wait(0) @@ -99,3 +64,40 @@ function ESX.Scaleform.Utils.RequestScaleformMovie(movie) return scaleform end + +--- Executes a method on a scaleform movie with optional arguments and return value. +--- The caller is responsible for disposing of the scaleform using `SetScaleformMovieAsNoLongerNeeded`. +---@param scaleform number|string # Scaleform handle or name to request the scaleform movie +---@param methodName string # The method name to call on the scaleform +---@param returnValue? boolean # Whether to return the value from the method +---@param ... number|string|boolean # Arguments to pass to the method +---@return number, number? # The scaleform handle, and the return value if `returnValue` is true +function ESX.Scaleform.Utils.RunMethod(scaleform, methodName, returnValue, ...) + scaleform = type(scaleform) == "number" and scaleform or ESX.Scaleform.Utils.RequestScaleformMovie(scaleform) + BeginScaleformMovieMethod(scaleform, methodName) + + local args = { ... } + for i, arg in ipairs(args) do + local typeArg = type(arg) + + if typeArg == "number" then + if math.type(arg) == "float" then + ScaleformMovieMethodAddParamFloat(arg) + else + ScaleformMovieMethodAddParamInt(arg) + end + elseif typeArg == "string" then + ScaleformMovieMethodAddParamTextureNameString(arg) + elseif typeArg == "boolean" then + ScaleformMovieMethodAddParamBool(arg) + end + end + + if returnValue then + return scaleform, EndScaleformMovieMethodReturnValue() + end + + EndScaleformMovieMethod() + + return scaleform +end diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index a579d4ee..c43e9574 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'cerulean' game 'gta5' description 'The Core resource that provides the functionalities for all other resources.' lua54 'yes' -version '1.12.3' +version '1.12.2' shared_scripts { 'locale.lua', diff --git a/[core]/esx_chat_theme/README.md b/[core]/esx_chat_theme/README.md index a87e8af7..1d149d4a 100644 --- a/[core]/esx_chat_theme/README.md +++ b/[core]/esx_chat_theme/README.md @@ -6,7 +6,7 @@ A ESX-Based Chat-theme for your server esx_chat_theme - ESX Chat Theme -Copyright (C) 2025 Jérémie N'gadi +Copyright (C) 2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_chat_theme/fxmanifest.lua b/[core]/esx_chat_theme/fxmanifest.lua index 704c76b3..e29afa25 100644 --- a/[core]/esx_chat_theme/fxmanifest.lua +++ b/[core]/esx_chat_theme/fxmanifest.lua @@ -1,4 +1,4 @@ -version '1.12.3' +version '1.12.2' author 'ESX-Framework' description 'A ESX Stylised theme for the chat resource.' diff --git a/[core]/esx_context/LICENSE b/[core]/esx_context/LICENSE index d73da6ba..dae70ee4 100644 --- a/[core]/esx_context/LICENSE +++ b/[core]/esx_context/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. esx_context - Copyright (C) 2022-2025 ESX Framework + Copyright (C) 2022-2024 ESX Framework 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: - esx_context Copyright (C) 2022-2025 ESX Framework + esx_context Copyright (C) 2022-2024 ESX Framework 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/[core]/esx_context/README.md b/[core]/esx_context/README.md index 9acc04e9..6b6a53de 100644 --- a/[core]/esx_context/README.md +++ b/[core]/esx_context/README.md @@ -6,7 +6,7 @@ A elegant, easy to use Context Menu system to make User Interactions clean and h esx_context -Copyright (C) 2022-2025 ESX Framework +Copyright (C) 2022-2024 ESX Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_context/fxmanifest.lua b/[core]/esx_context/fxmanifest.lua index 4be9c618..0db66d92 100644 --- a/[core]/esx_context/fxmanifest.lua +++ b/[core]/esx_context/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' author 'ESX-Framework & Brayden' description 'A simplistic context menu for ESX.' lua54 'yes' -version '1.12.3' +version '1.12.2' ui_page 'index.html' diff --git a/[core]/esx_identity/LICENSE b/[core]/esx_identity/LICENSE index 0466d652..e57012ae 100644 --- a/[core]/esx_identity/LICENSE +++ b/[core]/esx_identity/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. esx_identity - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - esx_identity Copyright (C) 2015-2025 Jérémie N'gadi + esx_identity Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/esx_identity/README.md b/[core]/esx_identity/README.md index 2b9618c9..c0637081 100644 --- a/[core]/esx_identity/README.md +++ b/[core]/esx_identity/README.md @@ -21,7 +21,7 @@ A Core Resource that Allows the player to Pick their characters, Name, Gender, H esx_identity - Make your Character a Person! -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_identity/fxmanifest.lua b/[core]/esx_identity/fxmanifest.lua index 1ff5e2de..027d1168 100644 --- a/[core]/esx_identity/fxmanifest.lua +++ b/[core]/esx_identity/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'Allows the player to Pick their characters: Name, Gender, Height and Date-of-birth.' lua54 'yes' -version '1.12.3' +version '1.12.2' shared_scripts { '@es_extended/imports.lua', diff --git a/[core]/esx_loadingscreen/LICENSE b/[core]/esx_loadingscreen/LICENSE index 80785a16..79832f23 100644 --- a/[core]/esx_loadingscreen/LICENSE +++ b/[core]/esx_loadingscreen/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. esx_loadingscreen - Copyright (C) 2020-2025 ESX Framework + Copyright (C) 2020-2024 ESX Framework 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: - esx_loadingscreen Copyright (C) 2020-2025 ESX Framework + esx_loadingscreen Copyright (C) 2020-2024 ESX Framework 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/[core]/esx_loadingscreen/README.md b/[core]/esx_loadingscreen/README.md index 0e39378e..366c5ada 100644 --- a/[core]/esx_loadingscreen/README.md +++ b/[core]/esx_loadingscreen/README.md @@ -6,7 +6,7 @@ A simple but beautiful Loading Screen for your server! esx_loadingscreen - Loading in style! -Copyright (C) 2020-2025 ESX Framework +Copyright (C) 2020-2024 ESX Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_loadingscreen/fxmanifest.lua b/[core]/esx_loadingscreen/fxmanifest.lua index 9c5eba20..35acfdb9 100644 --- a/[core]/esx_loadingscreen/fxmanifest.lua +++ b/[core]/esx_loadingscreen/fxmanifest.lua @@ -3,7 +3,7 @@ game 'common' fx_version 'cerulean' author 'ESX-Framework' description 'Allows resources to Run tasks at specific intervals.' -version '1.12.3' +version '1.12.2' lua54 'yes' loadscreen 'index.html' diff --git a/[core]/esx_menu_default/LICENSE b/[core]/esx_menu_default/LICENSE index e4c61364..8eef124b 100644 --- a/[core]/esx_menu_default/LICENSE +++ b/[core]/esx_menu_default/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. esx_menu_default - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - esx_menu_default Copyright (C) 2015-2025 Jérémie N'gadi + esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/esx_menu_default/README.md b/[core]/esx_menu_default/README.md index 8a6bd80f..29e07d1f 100644 --- a/[core]/esx_menu_default/README.md +++ b/[core]/esx_menu_default/README.md @@ -9,7 +9,7 @@ A default List type menu for ESX. esx_menu_default - Default Menu! -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_menu_default/fxmanifest.lua b/[core]/esx_menu_default/fxmanifest.lua index fc171998..851fbcd6 100644 --- a/[core]/esx_menu_default/fxmanifest.lua +++ b/[core]/esx_menu_default/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'A basic menu system for ESX Legacy.' lua54 'yes' -version '1.12.3' +version '1.12.2' client_scripts { '@es_extended/imports.lua', 'client/main.lua' } diff --git a/[core]/esx_menu_dialog/LICENSE b/[core]/esx_menu_dialog/LICENSE index 625326fe..7b3fd1a9 100644 --- a/[core]/esx_menu_dialog/LICENSE +++ b/[core]/esx_menu_dialog/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. esx_menu_dialog - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - esx_menu_dialog Copyright (C) 2015-2025 Jérémie N'gadi + esx_menu_dialog Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/esx_menu_dialog/README.md b/[core]/esx_menu_dialog/README.md index 6817fcd8..038f95f7 100644 --- a/[core]/esx_menu_dialog/README.md +++ b/[core]/esx_menu_dialog/README.md @@ -12,10 +12,10 @@ start esx_menu_dialog ### License esx_menu_dialog - input dialog for ESX -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. -You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. +You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. \ No newline at end of file diff --git a/[core]/esx_menu_dialog/fxmanifest.lua b/[core]/esx_menu_dialog/fxmanifest.lua index 09350575..a932977a 100644 --- a/[core]/esx_menu_dialog/fxmanifest.lua +++ b/[core]/esx_menu_dialog/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'A basic input dialog for ESX Legacy.' lua54 'yes' -version '1.12.3' +version '1.12.2' client_scripts { '@es_extended/imports.lua', diff --git a/[core]/esx_menu_list/LICENSE b/[core]/esx_menu_list/LICENSE index 455eebc8..b56c9231 100644 --- a/[core]/esx_menu_list/LICENSE +++ b/[core]/esx_menu_list/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. esx_menu_list - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - esx_menu_list Copyright (C) 2015-2025 Jérémie N'gadi + esx_menu_list Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/esx_menu_list/README.md b/[core]/esx_menu_list/README.md index 9fd8fc26..9b829283 100644 --- a/[core]/esx_menu_list/README.md +++ b/[core]/esx_menu_list/README.md @@ -5,10 +5,10 @@ Advanced menu inputs for ESX ### License esx_menu_list - advanced menu inputs for ESX -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. -You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. +You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/. \ No newline at end of file diff --git a/[core]/esx_menu_list/fxmanifest.lua b/[core]/esx_menu_list/fxmanifest.lua index f0f4b534..606c36ad 100644 --- a/[core]/esx_menu_list/fxmanifest.lua +++ b/[core]/esx_menu_list/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' description 'A basic table-based menu system for ESX Legacy.' lua54 'yes' -version '1.12.3' +version '1.12.2' client_scripts { diff --git a/[core]/esx_multicharacter/LICENSE.md b/[core]/esx_multicharacter/LICENSE.md index 45ddb022..e23434ea 100644 --- a/[core]/esx_multicharacter/LICENSE.md +++ b/[core]/esx_multicharacter/LICENSE.md @@ -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. esx_multicharacter - Copyright (C) 2022-2025 ESX Framework, Linden, KASH + Copyright (C) 2022-2024 ESX Framework, Linden, KASH 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: - esx_multicharacter Copyright (C) 2022-2025 ESX Framework, Linden, KASH + esx_multicharacter Copyright (C) 2022-2024 ESX Framework, Linden, KASH 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/[core]/esx_multicharacter/fxmanifest.lua b/[core]/esx_multicharacter/fxmanifest.lua index 670945b9..81c76c37 100644 --- a/[core]/esx_multicharacter/fxmanifest.lua +++ b/[core]/esx_multicharacter/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'cerulean' game 'gta5' author 'ESX-Framework - Linden - KASH' description 'Allows players to have multiple characters on the same account.' -version '1.12.3' +version '1.12.2' lua54 'yes' dependencies { 'es_extended', 'esx_context', 'esx_identity', 'esx_skin' } diff --git a/[core]/esx_multicharacter/readme.md b/[core]/esx_multicharacter/readme.md index eb2ffa6b..2517728e 100644 --- a/[core]/esx_multicharacter/readme.md +++ b/[core]/esx_multicharacter/readme.md @@ -21,7 +21,7 @@ A Simplistic system, that allows Players to have multiple Characters, which can Official Multi-Character system for ESX Legacy -Copyright © 2022-2025 Linden, ESX-Framework and KASH +Copyright © 2022-2024 Linden, ESX-Framework and KASH 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 diff --git a/[core]/esx_notify/LICENSE b/[core]/esx_notify/LICENSE index 28d1db85..a7568793 100644 --- a/[core]/esx_notify/LICENSE +++ b/[core]/esx_notify/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. esx_notify - Copyright (C) 2022-2025 ESX Framework + Copyright (C) 2022-2024 ESX Framework 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: - esx_notify Copyright (C) 2022-2025 ESX Framework + esx_notify Copyright (C) 2022-2024 ESX Framework 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/[core]/esx_notify/fxmanifest.lua b/[core]/esx_notify/fxmanifest.lua index dd554681..d019b983 100644 --- a/[core]/esx_notify/fxmanifest.lua +++ b/[core]/esx_notify/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' lua54 'yes' game 'gta5' -version '1.12.3' +version '1.12.2' author 'ESX-Framework' description 'A beautiful and simple NUI notification system for ESX' diff --git a/[core]/esx_notify/readme.md b/[core]/esx_notify/readme.md index 621b89f7..f6bc4c9d 100644 --- a/[core]/esx_notify/readme.md +++ b/[core]/esx_notify/readme.md @@ -55,7 +55,7 @@ ESX.ShowNotification("I i ~r~love~s~ donuts", "success", 3000) esx_notify- Notify! -Copyright (C) 2022-2025 ESX-Framework +Copyright (C) 2022-2024 ESX-Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_progressbar/LICENSE b/[core]/esx_progressbar/LICENSE index 28d1db85..e3013ae2 100644 --- a/[core]/esx_progressbar/LICENSE +++ b/[core]/esx_progressbar/LICENSE @@ -1,674 +1,674 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -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. - - esx_notify - Copyright (C) 2022-2025 ESX Framework - - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -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: - - esx_notify Copyright (C) 2022-2025 ESX Framework - 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. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +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. + + esx_notify + Copyright (C) 2022-2024 ESX Framework + + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +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: + + esx_notify Copyright (C) 2022-2024 ESX Framework + 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. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[core]/esx_progressbar/fxmanifest.lua index 2180b57f..54caeda1 100644 --- a/[core]/esx_progressbar/fxmanifest.lua +++ b/[core]/esx_progressbar/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' description 'A beautiful and simple NUI progress bar for ESX' -version '1.12.3' +version '1.12.2' lua54 'yes' client_scripts { 'Progress.lua' } diff --git a/[core]/esx_progressbar/readme.md b/[core]/esx_progressbar/readme.md index 91ec2123..a3daddfe 100644 --- a/[core]/esx_progressbar/readme.md +++ b/[core]/esx_progressbar/readme.md @@ -3,12 +3,12 @@ * ESX Function ```lua ESX.Progressbar("test", 25000,{ - FreezePlayer = false, + FreezePlayer = false, animation ={ type = "anim", - dict = "mini@prostitutes@sexlow_veh", - lib ="low_car_sex_to_prop_p2_player" - }, + dict = "mini@prostitutes@sexlow_veh", + lib ="low_car_sex_to_prop_p2_player" + }, onFinish = function() --Code here end}) @@ -16,13 +16,13 @@ ``` * Export - + ```lua exports["esx_progressbar"]:Progressbar("Unlocking Storage", 3000,{ - FreezePlayer = true, + FreezePlayer = true, animation ={ type = "anim", - dict = "anim@mp_player_intmenu@key_fob@", + dict = "anim@mp_player_intmenu@key_fob@", lib ="fob_click" }, onFinish = function() @@ -31,13 +31,13 @@ ``` * Cancel - + ```lua ESX.Progressbar("Unlocking Storage", 3000,{ - FreezePlayer = true, + FreezePlayer = true, animation ={ type = "anim", - dict = "anim@mp_player_intmenu@key_fob@", + dict = "anim@mp_player_intmenu@key_fob@", lib ="fob_click" }, onFinish = function() @@ -49,13 +49,13 @@ ``` * Scenario - + ```lua ESX.Progressbar("Unlocking Storage", 3000,{ - FreezePlayer = true, + FreezePlayer = true, animation ={ type = "Scenario", - Scenario = "PROP_HUMAN_BUM_BIN", + Scenario = "PROP_HUMAN_BUM_BIN", }, onFinish = function() --Code here @@ -69,10 +69,10 @@ esx_progressbar -Copyright (C) 2022-2025 ESX-Framework +Copyright (C) 2022-2024 ESX-Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details. -You should have received a copy Of the GNU General Public License along with this program. If Not, see . +You should have received a copy Of the GNU General Public License along with this program. If Not, see . \ No newline at end of file diff --git a/[core]/esx_skin/LICENSE b/[core]/esx_skin/LICENSE index 39517c08..78332fdb 100644 --- a/[core]/esx_skin/LICENSE +++ b/[core]/esx_skin/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. esx_skin - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - esx_skin Copyright (C) 2015-2025 Jérémie N'gadi + esx_skin Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/esx_skin/README.md b/[core]/esx_skin/README.md index 57c091b3..e004178c 100644 --- a/[core]/esx_skin/README.md +++ b/[core]/esx_skin/README.md @@ -32,7 +32,7 @@ start esx_skin ### License esx_skin - skin selector for ESX -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/esx_skin/fxmanifest.lua b/[core]/esx_skin/fxmanifest.lua index 25569210..0485a171 100644 --- a/[core]/esx_skin/fxmanifest.lua +++ b/[core]/esx_skin/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' description 'Allows players to customise their character\'s appearance' -version '1.12.3' +version '1.12.2' lua54 'yes' shared_scripts { diff --git a/[core]/esx_textui/LICENSE b/[core]/esx_textui/LICENSE index 77dc202c..cf001768 100644 --- a/[core]/esx_textui/LICENSE +++ b/[core]/esx_textui/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. esx_textui - Copyright (C) 2015-2025 ESX Framework + Copyright (C) 2015-2024 ESX Framework 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: - esx_textui Copyright (C) 2022-2025 ESX Framework + esx_textui Copyright (C) 2022-2024 ESX Framework 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/[core]/esx_textui/fxmanifest.lua b/[core]/esx_textui/fxmanifest.lua index 0fdd5605..4dc027b8 100644 --- a/[core]/esx_textui/fxmanifest.lua +++ b/[core]/esx_textui/fxmanifest.lua @@ -3,7 +3,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' description 'A beautiful and simple Persistent Notification system for ESX.' -version '1.12.3' +version '1.12.2' lua54 'yes' client_scripts { 'TextUI.lua' } diff --git a/[core]/esx_textui/readme.md b/[core]/esx_textui/readme.md index bdd3bda8..922e11a8 100644 --- a/[core]/esx_textui/readme.md +++ b/[core]/esx_textui/readme.md @@ -43,7 +43,7 @@ ESX.TextUI("i ~r~love~s~ donuts", "error") esx_textui - Persistent Notifications -Copyright (C) 2022-2025 ESX Framework +Copyright (C) 2022-2024 ESX Framework 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/skinchanger/LICENSE b/[core]/skinchanger/LICENSE index bcb2e5ff..89a184fc 100644 --- a/[core]/skinchanger/LICENSE +++ b/[core]/skinchanger/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. skinchanger - Copyright (C) 2015-2025 Jérémie N'gadi + Copyright (C) 2015-2024 Jérémie N'gadi 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: - skinchanger Copyright (C) 2015-2025 Jérémie N'gadi + skinchanger Copyright (C) 2015-2024 Jérémie N'gadi 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/[core]/skinchanger/README.md b/[core]/skinchanger/README.md index 141c344f..7b1b3dd6 100644 --- a/[core]/skinchanger/README.md +++ b/[core]/skinchanger/README.md @@ -73,7 +73,7 @@ end) skinchanger - Own your skin! -Copyright (C) 2015-2025 Jérémie N'gadi +Copyright (C) 2015-2024 Jérémie N'gadi 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 the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[core]/skinchanger/fxmanifest.lua b/[core]/skinchanger/fxmanifest.lua index 288bd751..43cefff9 100644 --- a/[core]/skinchanger/fxmanifest.lua +++ b/[core]/skinchanger/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'adamant' game 'gta5' description 'Saves/loads character appearances for ESX Legacy.' -version '1.12.3' +version '1.12.2' lua54 'yes' client_scripts { From 9019935bf5c75c7f3226528dc03c0f42c39e3f04 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:44:49 +0100 Subject: [PATCH 26/69] fix(es_extended/client/modules/adjustments): `SetHudComponentPosition` expects float --- [core]/es_extended/client/modules/adjustments.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/client/modules/adjustments.lua b/[core]/es_extended/client/modules/adjustments.lua index b4d4fe8a..00412fcb 100644 --- a/[core]/es_extended/client/modules/adjustments.lua +++ b/[core]/es_extended/client/modules/adjustments.lua @@ -4,7 +4,7 @@ function Adjustments:RemoveHudComponents() for i = 1, #Config.RemoveHudComponents do if Config.RemoveHudComponents[i] then SetHudComponentSize(i, 0.0, 0.0) - SetHudComponentPosition(i, 900, 900) + SetHudComponentPosition(i, 900.0, 900.0) end end end From c744cf9bac1379bb33db96a3fe9aa3e789a829f7 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:20:09 +0100 Subject: [PATCH 27/69] fix(es_extended/client/modules/death): fix death thread on first spawn --- [core]/es_extended/client/modules/death.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/[core]/es_extended/client/modules/death.lua b/[core]/es_extended/client/modules/death.lua index ba3fb846..346c3ce4 100644 --- a/[core]/es_extended/client/modules/death.lua +++ b/[core]/es_extended/client/modules/death.lua @@ -62,6 +62,8 @@ end AddEventHandler("esx:onPlayerSpawn", function() Citizen.CreateThreadNow(function() + while not ESX.PlayerLoaded do Wait(0) end + while ESX.PlayerLoaded and not ESX.PlayerData.dead do if DoesEntityExist(ESX.PlayerData.ped) and (IsPedDeadOrDying(ESX.PlayerData.ped, true) or IsPedFatallyInjured(ESX.PlayerData.ped)) then Death:Died() From bde89e7dbfe6e9b81be61a74050870a578744bff Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 18 Jan 2025 21:41:36 +0100 Subject: [PATCH 28/69] refactor(es_extended/locale): refactor Translate fun --- [core]/es_extended/locale.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/[core]/es_extended/locale.lua b/[core]/es_extended/locale.lua index db77eba7..7d940e4f 100644 --- a/[core]/es_extended/locale.lua +++ b/[core]/es_extended/locale.lua @@ -3,21 +3,23 @@ Locales = {} function Translate(str, ...) -- Translate string if not str then error(("Resource ^5%s^1 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() or GetCurrentResourceName())) - return "Given translate function parameter is nil!" end - if Locales[Config.Locale] then - if Locales[Config.Locale][str] then - return string.format(Locales[Config.Locale][str], ...) - elseif Config.Locale ~= "en" and Locales["en"] and Locales["en"][str] then - return string.format(Locales["en"][str], ...) - else - return "Translation [" .. Config.Locale .. "][" .. str .. "] does not exist" + + local translations = Locales[Config.Locale] + if not translations then + -- Fall back to English translation if the current locale is not found + if Locales.en and Locales.en[str] then + return Locales.en[str]:format(...) end - elseif Config.Locale ~= "en" and Locales["en"] and Locales["en"][str] then - return string.format(Locales["en"][str], ...) - else - return "Locale [" .. Config.Locale .. "] does not exist" + + return ("Locale [%s] does not exist"):format(Config.Locale) end + + if translations[str] then + return translations[str]:format(...) + end + + return ("Translation [%s][%s] does not exist"):format(Config.Locale, str) end function TranslateCap(str, ...) -- Translate string first char uppercase From 86af2ef0edd8e6d23845048ae703cdb8f419d5ae Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:54:14 +0100 Subject: [PATCH 29/69] feat(es_extended/locale): add support for lazy loading locales --- [core]/es_extended/fxmanifest.lua | 2 +- [core]/es_extended/locale.lua | 20 +++++++++++++++----- [core]/es_extended/locales/cs.lua | 8 ++++---- [core]/es_extended/locales/de.lua | 2 +- [core]/es_extended/locales/el.lua | 2 +- [core]/es_extended/locales/en.lua | 2 +- [core]/es_extended/locales/es.lua | 2 +- [core]/es_extended/locales/fi.lua | 2 +- [core]/es_extended/locales/fr.lua | 2 +- [core]/es_extended/locales/he.lua | 2 +- [core]/es_extended/locales/hu.lua | 8 ++++---- [core]/es_extended/locales/id.lua | 2 +- [core]/es_extended/locales/it.lua | 2 +- [core]/es_extended/locales/nl.lua | 2 +- [core]/es_extended/locales/pl.lua | 8 ++++---- [core]/es_extended/locales/sl.lua | 8 ++++---- [core]/es_extended/locales/sr.lua | 8 ++++---- [core]/es_extended/locales/sv.lua | 2 +- [core]/es_extended/locales/tr.lua | 16 ++++++++-------- [core]/es_extended/locales/zh-cn.lua | 8 ++++---- [core]/es_extended/shared/config/main.lua | 9 ++++----- [core]/esx_identity/locales/cs.lua | 2 +- [core]/esx_identity/locales/da.lua | 2 +- [core]/esx_identity/locales/de.lua | 4 ++-- [core]/esx_identity/locales/en.lua | 2 +- [core]/esx_identity/locales/es.lua | 2 +- [core]/esx_identity/locales/fi.lua | 2 +- [core]/esx_identity/locales/fr.lua | 2 +- [core]/esx_identity/locales/he.lua | 2 +- [core]/esx_identity/locales/hu.lua | 2 +- [core]/esx_identity/locales/it.lua | 2 +- [core]/esx_identity/locales/nl.lua | 2 +- [core]/esx_identity/locales/pl.lua | 2 +- [core]/esx_identity/locales/pt.lua | 2 +- [core]/esx_identity/locales/sl.lua | 2 +- [core]/esx_identity/locales/sr.lua | 2 +- [core]/esx_identity/locales/sv.lua | 2 +- [core]/esx_skin/locales/da.lua | 2 +- [core]/esx_skin/locales/de.lua | 12 ++++++------ [core]/esx_skin/locales/en.lua | 2 +- [core]/esx_skin/locales/es.lua | 2 +- [core]/esx_skin/locales/fi.lua | 2 +- [core]/esx_skin/locales/fr.lua | 2 +- [core]/esx_skin/locales/he.lua | 2 +- [core]/esx_skin/locales/hu.lua | 2 +- [core]/esx_skin/locales/it.lua | 2 +- [core]/esx_skin/locales/nl.lua | 2 +- [core]/esx_skin/locales/pl.lua | 2 +- [core]/esx_skin/locales/pt.lua | 2 +- [core]/esx_skin/locales/sl.lua | 2 +- [core]/esx_skin/locales/sr.lua | 2 +- [core]/esx_skin/locales/sv.lua | 2 +- [core]/esx_skin/locales/zh-cn.lua | 2 +- 53 files changed, 101 insertions(+), 92 deletions(-) diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index 6bef9655..5bcca096 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -7,7 +7,6 @@ version '1.12.2' shared_scripts { 'locale.lua', - 'locales/*.lua', 'shared/config/main.lua', 'shared/config/weapons.lua', @@ -63,6 +62,7 @@ ui_page { files { 'imports.lua', + 'locales/*.lua', 'locale.js', 'html/ui.html', diff --git a/[core]/es_extended/locale.lua b/[core]/es_extended/locale.lua index 7d940e4f..3f059b62 100644 --- a/[core]/es_extended/locale.lua +++ b/[core]/es_extended/locale.lua @@ -5,14 +5,24 @@ function Translate(str, ...) -- Translate string error(("Resource ^5%s^1 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() or GetCurrentResourceName())) end + --- Load the locale file if it hasn't been loaded yet + if Locales[Config.Locale] == nil then + local success, result = pcall(function() + return assert(load(LoadResourceFile(GetCurrentResourceName(), ("locales/%s.lua"):format(Config.Locale))))() + end) + + Locales[Config.Locale] = success and result or false + end + local translations = Locales[Config.Locale] if not translations then - -- Fall back to English translation if the current locale is not found - if Locales.en and Locales.en[str] then - return Locales.en[str]:format(...) + if Config.Locale == "en" then + return "Locale [en] does not exist" end - return ("Locale [%s] does not exist"):format(Config.Locale) + -- Fall back to English translation if the current locale is not found + Config.Locale = "en" + return Translate(str, ...) end if translations[str] then @@ -28,4 +38,4 @@ end _ = Translate -- luacheck: ignore _U -_U = TranslateCap +_U = TranslateCap \ No newline at end of file diff --git a/[core]/es_extended/locales/cs.lua b/[core]/es_extended/locales/cs.lua index a9b278fd..435cd875 100644 --- a/[core]/es_extended/locales/cs.lua +++ b/[core]/es_extended/locales/cs.lua @@ -1,4 +1,4 @@ -Locales["cs"] = { +return { -- Inventory ["inventory"] = "Inventář ( Váha %s / %s )", ["use"] = "Použít", @@ -223,10 +223,10 @@ Locales["cs"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Míček", diff --git a/[core]/es_extended/locales/de.lua b/[core]/es_extended/locales/de.lua index 8951fdf0..3aac3dd2 100644 --- a/[core]/es_extended/locales/de.lua +++ b/[core]/es_extended/locales/de.lua @@ -1,4 +1,4 @@ -Locales["de"] = { +return { -- Inventory ["inventory"] = "Inventar ( Gewicht %s / %s )", ["use"] = "Benutzen", diff --git a/[core]/es_extended/locales/el.lua b/[core]/es_extended/locales/el.lua index ba1d1ab0..4fe64ddc 100644 --- a/[core]/es_extended/locales/el.lua +++ b/[core]/es_extended/locales/el.lua @@ -1,4 +1,4 @@ -Locales["el"] = { +return { -- Inventory ["inventory"] = "Αποθήκη ( Βάρος %s / %s )", ["use"] = "Χρήση", diff --git a/[core]/es_extended/locales/en.lua b/[core]/es_extended/locales/en.lua index 81431aec..194d2912 100644 --- a/[core]/es_extended/locales/en.lua +++ b/[core]/es_extended/locales/en.lua @@ -1,4 +1,4 @@ -Locales["en"] = { +return { -- Inventory ["inventory"] = "Inventory ( Weight %s / %s )", ["use"] = "Use", diff --git a/[core]/es_extended/locales/es.lua b/[core]/es_extended/locales/es.lua index 9d03a65d..b5bb38d3 100644 --- a/[core]/es_extended/locales/es.lua +++ b/[core]/es_extended/locales/es.lua @@ -1,4 +1,4 @@ -Locales["es"] = { +return { -- Inventory ["inventory"] = "Inventario %s / %s", ["use"] = "Usar", diff --git a/[core]/es_extended/locales/fi.lua b/[core]/es_extended/locales/fi.lua index 4d71ff48..a1ebffd2 100644 --- a/[core]/es_extended/locales/fi.lua +++ b/[core]/es_extended/locales/fi.lua @@ -1,4 +1,4 @@ -Locales["fi"] = { +return { -- Inventory ["inventory"] = "Reppu %s / %s", ["use"] = "Käytä", diff --git a/[core]/es_extended/locales/fr.lua b/[core]/es_extended/locales/fr.lua index a0a132b4..95f5f796 100644 --- a/[core]/es_extended/locales/fr.lua +++ b/[core]/es_extended/locales/fr.lua @@ -1,4 +1,4 @@ -Locales["fr"] = { +return { -- Inventory ["inventory"] = "Inventaire ( Poids %s / %s )", ["use"] = "Utiliser", diff --git a/[core]/es_extended/locales/he.lua b/[core]/es_extended/locales/he.lua index d6216573..4c8440ff 100644 --- a/[core]/es_extended/locales/he.lua +++ b/[core]/es_extended/locales/he.lua @@ -1,4 +1,4 @@ -Locales["he"] = { +return { -- Inventory ["inventory"] = "מלאי ( משקל %s / %s )", ["use"] = "השתמש", diff --git a/[core]/es_extended/locales/hu.lua b/[core]/es_extended/locales/hu.lua index 5d3b230b..e805ccf1 100644 --- a/[core]/es_extended/locales/hu.lua +++ b/[core]/es_extended/locales/hu.lua @@ -1,4 +1,4 @@ -Locales["hu"] = { +return { -- Inventory ["inventory"] = "Inventory ( Súly %s / %s )", ["use"] = "Használ", @@ -229,10 +229,10 @@ Locales["hu"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Baseball", diff --git a/[core]/es_extended/locales/id.lua b/[core]/es_extended/locales/id.lua index bbd2587c..1dfa8487 100644 --- a/[core]/es_extended/locales/id.lua +++ b/[core]/es_extended/locales/id.lua @@ -1,4 +1,4 @@ -Locales["id"] = { +return { -- Inventory ["inventory"] = "Inventaris ( Berat %s / %s )", ["use"] = "Gunakan", diff --git a/[core]/es_extended/locales/it.lua b/[core]/es_extended/locales/it.lua index 8a7caf59..9de0edb5 100644 --- a/[core]/es_extended/locales/it.lua +++ b/[core]/es_extended/locales/it.lua @@ -1,4 +1,4 @@ -Locales["it"] = { +return { -- Inventory ["inventory"] = "Inventario ( Peso %s / %s )", ["use"] = "Usa", diff --git a/[core]/es_extended/locales/nl.lua b/[core]/es_extended/locales/nl.lua index 2dee1716..494e0c3f 100644 --- a/[core]/es_extended/locales/nl.lua +++ b/[core]/es_extended/locales/nl.lua @@ -1,4 +1,4 @@ -Locales["nl"] = { +return { -- Inventory ["inventory"] = "Inventaris ( Gewicht %s / %s )", ["use"] = "Gebruik", diff --git a/[core]/es_extended/locales/pl.lua b/[core]/es_extended/locales/pl.lua index a9dceb4f..7535ffdd 100644 --- a/[core]/es_extended/locales/pl.lua +++ b/[core]/es_extended/locales/pl.lua @@ -1,4 +1,4 @@ -Locales["pl"] = { +return { -- Inventory ["inventory"] = "ekwipunek %s / %s", ["use"] = "użyj", @@ -202,10 +202,10 @@ Locales["pl"] = { ["component_luxary_finish"] = "luksusowe wykończenie broni", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Weapon Ammo ["ammo_rounds"] = "nabój/oi", diff --git a/[core]/es_extended/locales/sl.lua b/[core]/es_extended/locales/sl.lua index da0c9de4..3808ab28 100644 --- a/[core]/es_extended/locales/sl.lua +++ b/[core]/es_extended/locales/sl.lua @@ -1,4 +1,4 @@ -Locales["sl"] = { +return { -- Inventory ["inventory"] = "Shramba ( Teza %s / %s )", ["use"] = "Uporabi", @@ -229,10 +229,10 @@ Locales["sl"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Baseball", diff --git a/[core]/es_extended/locales/sr.lua b/[core]/es_extended/locales/sr.lua index 9ef51703..fb76e019 100644 --- a/[core]/es_extended/locales/sr.lua +++ b/[core]/es_extended/locales/sr.lua @@ -1,4 +1,4 @@ -Locales["sr"] = { +return { -- Inventory ["inventory"] = "Inventar ( Težina %s / %s )", ["use"] = "Koristi", @@ -229,10 +229,10 @@ Locales["sr"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Baseball", diff --git a/[core]/es_extended/locales/sv.lua b/[core]/es_extended/locales/sv.lua index e528baca..14e45b40 100644 --- a/[core]/es_extended/locales/sv.lua +++ b/[core]/es_extended/locales/sv.lua @@ -1,4 +1,4 @@ -Locales["sv"] = { +return { -- Inventory ["inventory"] = "Inventory ( Vikt %s / %s )", ["use"] = "Använd", diff --git a/[core]/es_extended/locales/tr.lua b/[core]/es_extended/locales/tr.lua index f12d6495..6c0f9edb 100644 --- a/[core]/es_extended/locales/tr.lua +++ b/[core]/es_extended/locales/tr.lua @@ -1,4 +1,4 @@ -Locales["tr"] = { +return { -- Inventory ["inventory"] = "Envanter ( Ağırlık %s / %s )", ["use"] = "Kullan", @@ -36,10 +36,10 @@ Locales["tr"] = { ["threw_weapon_already"] = "Bu Silaha Zaten Sahipsiniz", ["threw_cannot_pickup"] = "Envanter Dolu, Alınamaz!", ["threw_pickup_prompt"] = "Almak İçin E'ye Basın", - + -- Key mapping ["keymap_showinventory"] = "Envanteri Göster", - + -- Salary related ["received_salary"] = "Maaşınız Ödendi: $%s", ["received_help"] = "Yardım Çekiniz Ödendi: $%s", @@ -49,11 +49,11 @@ Locales["tr"] = { ["account_bank"] = "Banka", ["account_black_money"] = "Kirli Para", ["account_money"] = "Nakit", - + ["act_imp"] = "İşlem Yapılamaz", ["in_vehicle"] = "İşlem Yapılamaz, Oyuncu Araçta", ["not_in_vehicle"] = "İşlem Yapılamaz, Oyuncu Araçta Değil", - + -- Commands ["command_bring"] = "Oyuncuyu Yanınıza Getir", ["command_car"] = "Araç Spawn Et", @@ -119,14 +119,14 @@ Locales["tr"] = { ["command_giveammo_ammo"] = "Mermi Miktarı", ["tpm_nowaypoint"] = "Hiçbir Yol İşareti Ayarlanmadı.", ["tpm_success"] = "Başarıyla Teleport Edildi", - + ["noclip_message"] = "Noclip %s Yapıldı", ["enabled"] = "~g~Aktif Edildi~s~", ["disabled"] = "~r~Pasif Edildi~s~", - + -- Locale settings ["locale_digit_grouping_symbol"] = ",", - ["locale_currency"] = "£%s", + ["locale_currency"] = "£%s", -- Silahlar diff --git a/[core]/es_extended/locales/zh-cn.lua b/[core]/es_extended/locales/zh-cn.lua index 5971cc35..b49819e7 100644 --- a/[core]/es_extended/locales/zh-cn.lua +++ b/[core]/es_extended/locales/zh-cn.lua @@ -1,4 +1,4 @@ -Locales["zh-cn"] = { +return { -- Inventory ["inventory"] = "背包 %s / %s", ["use"] = "使用", @@ -229,10 +229,10 @@ Locales["zh-cn"] = { ["weapon_tactilerifle"] = "制式卡宾步枪", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "棒球", diff --git a/[core]/es_extended/shared/config/main.lua b/[core]/es_extended/shared/config/main.lua index 5d37450a..108d292d 100644 --- a/[core]/es_extended/shared/config/main.lua +++ b/[core]/es_extended/shared/config/main.lua @@ -1,5 +1,9 @@ Config = {} +local txAdminLocale = GetConvar("txAdmin-locale", "en") +local esxLocale = GetConvar("esx:locale", "invalid") +Config.Locale = (esxLocale ~= "invalid") and esxLocale or (txAdminLocale ~= "custom" and txAdminLocale) or "en" + -- for ox inventory, this will automatically be adjusted, do not change! for other inventories, change to "resource_name" Config.CustomInventory = false @@ -60,8 +64,3 @@ if GetResourceState("ox_inventory") ~= "missing" then end Config.EnableDefaultInventory = Config.CustomInventory == false -- Display the default Inventory ( F2 ) - -local txAdminLocale = GetConvar("txAdmin-locale", "en") -local esxLocale = GetConvar("esx:locale", "invalid") - -Config.Locale = (esxLocale ~= "invalid") and esxLocale or (txAdminLocale ~= "custom" and txAdminLocale) or "en" diff --git a/[core]/esx_identity/locales/cs.lua b/[core]/esx_identity/locales/cs.lua index bb17bed2..1482b154 100644 --- a/[core]/esx_identity/locales/cs.lua +++ b/[core]/esx_identity/locales/cs.lua @@ -1,4 +1,4 @@ -Locales["cs"] = { +return { ["show_registration"] = "zobrazit registracni menu", ["show_active_character"] = "zobrazit aktivni postavy", ["delete_character"] = "smazat svou stavajici postavu a vytvorit novou", diff --git a/[core]/esx_identity/locales/da.lua b/[core]/esx_identity/locales/da.lua index 21c03808..f5c0c1d2 100644 --- a/[core]/esx_identity/locales/da.lua +++ b/[core]/esx_identity/locales/da.lua @@ -1,4 +1,4 @@ -Locales["da"] = { +return { ["show_active_character"] = "Vis aktiv karakter", ["active_character"] = "Aktiv karakter: %s", ["error_active_character"] = "Der opstod en fejl under indhentning af dine data.", diff --git a/[core]/esx_identity/locales/de.lua b/[core]/esx_identity/locales/de.lua index 4c6de824..b2285b00 100644 --- a/[core]/esx_identity/locales/de.lua +++ b/[core]/esx_identity/locales/de.lua @@ -1,4 +1,4 @@ -Locales["de"] = { +return { ["show_active_character"] = "Aktiven Charakter anzeigen", ["active_character"] = "Aktiver Charakter: %s", ["error_active_character"] = "Beim Abrufen deiner Daten ist ein Fehler aufgetreten", @@ -35,4 +35,4 @@ Locales["de"] = { ["invalid_dob_format"] = "Ungültiges Format (Geburtstag): Bitte versuche es erneut.", ["invalid_sex_format"] = "Ungültiges Format (Geschlecht): Bitte versuche es erneut.", ["invalid_height_format"] = "Ungültiges Format (Körpergröße): Bitte versuche es erneut.", -} \ No newline at end of file +} diff --git a/[core]/esx_identity/locales/en.lua b/[core]/esx_identity/locales/en.lua index ab3d922c..fa4737e3 100644 --- a/[core]/esx_identity/locales/en.lua +++ b/[core]/esx_identity/locales/en.lua @@ -1,4 +1,4 @@ -Locales["en"] = { +return { ["show_active_character"] = "Show Active Character", ["active_character"] = "Active Character: %s", ["error_active_character"] = "There was an error obtaining your data.", diff --git a/[core]/esx_identity/locales/es.lua b/[core]/esx_identity/locales/es.lua index d6385eac..3961d823 100644 --- a/[core]/esx_identity/locales/es.lua +++ b/[core]/esx_identity/locales/es.lua @@ -1,4 +1,4 @@ -Locales["es"] = { +return { ["show_active_character"] = "Mostrar personaje actual", ["active_character"] = "Personaje actual: %s", ["error_active_character"] = "Se produjo un error al recuperar tu nombre. Por favor contacta con un administrador", diff --git a/[core]/esx_identity/locales/fi.lua b/[core]/esx_identity/locales/fi.lua index c9d9ccb3..f2c87935 100644 --- a/[core]/esx_identity/locales/fi.lua +++ b/[core]/esx_identity/locales/fi.lua @@ -1,4 +1,4 @@ -Locales["fi"] = { +return { ["show_active_character"] = "Näytä nykyinen hahmosi", ["active_character"] = "Nykyinen hahmosi: %s", ["error_active_character"] = "Hahmosi hakemisessa ilmeni ongelma. Ota yhteyttä ylläpitoon.", diff --git a/[core]/esx_identity/locales/fr.lua b/[core]/esx_identity/locales/fr.lua index 36b9d866..4a0e007b 100644 --- a/[core]/esx_identity/locales/fr.lua +++ b/[core]/esx_identity/locales/fr.lua @@ -1,4 +1,4 @@ -Locales["fr"] = { +return { ["show_active_character"] = "Afficher le personnage actif", ["active_character"] = "Personnage actif: %s", ["error_active_character"] = "Une erreur s'est produite lors de l'obtention de vos données.", diff --git a/[core]/esx_identity/locales/he.lua b/[core]/esx_identity/locales/he.lua index 18c8a514..1205e4ec 100644 --- a/[core]/esx_identity/locales/he.lua +++ b/[core]/esx_identity/locales/he.lua @@ -1,4 +1,4 @@ -Locales["he"] = { +return { ["show_active_character"] = "הצג דמות פעילה", ["active_character"] = "דמות פעילה: %s", ["error_active_character"] = "אירעה שגיאה בקבלת הנתונים שלך.", diff --git a/[core]/esx_identity/locales/hu.lua b/[core]/esx_identity/locales/hu.lua index 0af9173d..3c08cd3c 100644 --- a/[core]/esx_identity/locales/hu.lua +++ b/[core]/esx_identity/locales/hu.lua @@ -1,4 +1,4 @@ -Locales["hu"] = { +return { ["show_active_character"] = "Aktív karakterek mutatása", ["active_character"] = "Aktív karakter: %s", ["error_active_character"] = "A név nem megfelelő", diff --git a/[core]/esx_identity/locales/it.lua b/[core]/esx_identity/locales/it.lua index 41ce44e3..6bdca479 100644 --- a/[core]/esx_identity/locales/it.lua +++ b/[core]/esx_identity/locales/it.lua @@ -1,4 +1,4 @@ -Locales["it"] = { +return { ["show_active_character"] = "Mostra Personaggio Attivo", ["active_character"] = "Personaggio Attivo: %s", ["error_active_character"] = "Errore nel recuperare i tuoi dati.", diff --git a/[core]/esx_identity/locales/nl.lua b/[core]/esx_identity/locales/nl.lua index 6cd862c6..a5bd0082 100644 --- a/[core]/esx_identity/locales/nl.lua +++ b/[core]/esx_identity/locales/nl.lua @@ -1,4 +1,4 @@ -Locales["nl"] = { +return { ["show_active_character"] = "Actieve karakter laten zien", ["active_character"] = "Actief karakter: %s", ["error_active_character"] = "Er is een probleem opgetreden tijdens het verzamelen van uw data.", diff --git a/[core]/esx_identity/locales/pl.lua b/[core]/esx_identity/locales/pl.lua index d10a7968..7f6551cb 100644 --- a/[core]/esx_identity/locales/pl.lua +++ b/[core]/esx_identity/locales/pl.lua @@ -1,4 +1,4 @@ -Locales["pl"] = { +return { ["show_active_character"] = "Pokaż aktywną postać", ["active_character"] = "Aktywna postać: %s", ["error_active_character"] = "Podczas pobierania Twojego imienia wystąpił błąd. Proszę skontaktować się z administratorem.", diff --git a/[core]/esx_identity/locales/pt.lua b/[core]/esx_identity/locales/pt.lua index 52088df8..1d78f10d 100644 --- a/[core]/esx_identity/locales/pt.lua +++ b/[core]/esx_identity/locales/pt.lua @@ -1,4 +1,4 @@ -Locales["pt"] = { +return { ["show_active_character"] = "Mostrar personagem ativa", ["active_character"] = "Personagem ativa: %s", ["error_active_character"] = "Houve um erro a obter os teus dados.", diff --git a/[core]/esx_identity/locales/sl.lua b/[core]/esx_identity/locales/sl.lua index 1d93aa7b..cf4ad1e9 100644 --- a/[core]/esx_identity/locales/sl.lua +++ b/[core]/esx_identity/locales/sl.lua @@ -1,4 +1,4 @@ -Locales["sl"] = { +return { ["show_active_character"] = "Prikaži aktivnega lika", ["active_character"] = "Aktivni lik: %s", ["error_active_character"] = "Prišlo je do napake pri pridobivanju podatkov.", diff --git a/[core]/esx_identity/locales/sr.lua b/[core]/esx_identity/locales/sr.lua index 8cb37a22..f34819e7 100644 --- a/[core]/esx_identity/locales/sr.lua +++ b/[core]/esx_identity/locales/sr.lua @@ -1,4 +1,4 @@ -Locales["sr"] = { +return { ["show_active_character"] = "Prikazi karaktere", ["active_character"] = "Karakteri: %s", ["error_active_character"] = "Imamo problem sa ucitavanjem karaktera.", diff --git a/[core]/esx_identity/locales/sv.lua b/[core]/esx_identity/locales/sv.lua index 6c291d34..c298c85b 100644 --- a/[core]/esx_identity/locales/sv.lua +++ b/[core]/esx_identity/locales/sv.lua @@ -1,4 +1,4 @@ -Locales["sv"] = { +return { ["show_active_character"] = "Visa aktiv karaktär", ["active_character"] = "Aktiv karaktär: %s", ["error_active_character"] = "Det blev ett fel med att ta din data.", diff --git a/[core]/esx_skin/locales/da.lua b/[core]/esx_skin/locales/da.lua index 4aee2f79..b799e3f8 100644 --- a/[core]/esx_skin/locales/da.lua +++ b/[core]/esx_skin/locales/da.lua @@ -1,4 +1,4 @@ -Locales["da"] = { +return { ["skin_menu"] = "Udseende Menu", ["use_rotate_view"] = "brug Q og E for at dreje kameraet.", ["skin"] = "skift udseende", diff --git a/[core]/esx_skin/locales/de.lua b/[core]/esx_skin/locales/de.lua index d92041a1..efc46293 100644 --- a/[core]/esx_skin/locales/de.lua +++ b/[core]/esx_skin/locales/de.lua @@ -1,6 +1,6 @@ -Locales["de"] = { - ["skin_menu"] = "Skin Menü", - ["use_rotate_view"] = "Drücke Q oder E um deine Ansicht zu ändern.", - ["skin"] = "Aussehen ändern", - ["saveskin"] = "Aussehen abspeichern", - } +return { + ["skin_menu"] = "Skin Menü", + ["use_rotate_view"] = "Drücke Q oder E um deine Ansicht zu ändern.", + ["skin"] = "Aussehen ändern", + ["saveskin"] = "Aussehen abspeichern", +} diff --git a/[core]/esx_skin/locales/en.lua b/[core]/esx_skin/locales/en.lua index afc9581a..a7a52162 100644 --- a/[core]/esx_skin/locales/en.lua +++ b/[core]/esx_skin/locales/en.lua @@ -1,4 +1,4 @@ -Locales["en"] = { +return { ["skin_menu"] = "Skin Menu", ["use_rotate_view"] = "use Q and E to rotate the view.", ["skin"] = "change skin", diff --git a/[core]/esx_skin/locales/es.lua b/[core]/esx_skin/locales/es.lua index 735c78fe..a34840ac 100644 --- a/[core]/esx_skin/locales/es.lua +++ b/[core]/esx_skin/locales/es.lua @@ -1,4 +1,4 @@ -Locales["es"] = { +return { ["skin_menu"] = "Menú de apariencia", ["use_rotate_view"] = "Utiliza Q y E para rotar la vista.", ["skin"] = "Cambiar aspecto", diff --git a/[core]/esx_skin/locales/fi.lua b/[core]/esx_skin/locales/fi.lua index 7747dcc0..b6b342a1 100644 --- a/[core]/esx_skin/locales/fi.lua +++ b/[core]/esx_skin/locales/fi.lua @@ -1,4 +1,4 @@ -Locales["fi"] = { +return { ["skin_menu"] = "Ulkonäkö", ["use_rotate_view"] = "Paina Q tai E liikutaaksesi kameraa.", ["skin"] = "Muokkaa ulkonäköä", diff --git a/[core]/esx_skin/locales/fr.lua b/[core]/esx_skin/locales/fr.lua index 44d3d4b2..7f5a5f85 100644 --- a/[core]/esx_skin/locales/fr.lua +++ b/[core]/esx_skin/locales/fr.lua @@ -1,4 +1,4 @@ -Locales["fr"] = { +return { ["skin_menu"] = "menu de Skin", ["use_rotate_view"] = "utilisez Q et E pour tourner la vue.", ["skin"] = "changer de skin", diff --git a/[core]/esx_skin/locales/he.lua b/[core]/esx_skin/locales/he.lua index 6f750e07..6b24b452 100644 --- a/[core]/esx_skin/locales/he.lua +++ b/[core]/esx_skin/locales/he.lua @@ -1,4 +1,4 @@ -Locales["he"] = { +return { ["skin_menu"] = "תפריט עור", ["use_rotate_view"] = "השתמש Q ו E כדי לסובב את התצוגה.", ["skin"] = "שנה עור", diff --git a/[core]/esx_skin/locales/hu.lua b/[core]/esx_skin/locales/hu.lua index a83ea999..aa44c251 100644 --- a/[core]/esx_skin/locales/hu.lua +++ b/[core]/esx_skin/locales/hu.lua @@ -1,4 +1,4 @@ -Locales["hu"] = { +return { ["skin_menu"] = "Kinézet Menü", ["use_rotate_view"] = "Használd Q vagy E gombokat a forgatáshoz", ["skin"] = "kinézet változtatása", diff --git a/[core]/esx_skin/locales/it.lua b/[core]/esx_skin/locales/it.lua index c6605e97..7d20e777 100644 --- a/[core]/esx_skin/locales/it.lua +++ b/[core]/esx_skin/locales/it.lua @@ -1,4 +1,4 @@ -Locales["it"] = { +return { ["skin_menu"] = "Menu Skin", ["use_rotate_view"] = "usa Q e E per ruotare la visuale.", ["skin"] = "cambia skin", diff --git a/[core]/esx_skin/locales/nl.lua b/[core]/esx_skin/locales/nl.lua index 1ec2b1d2..bf8c0543 100644 --- a/[core]/esx_skin/locales/nl.lua +++ b/[core]/esx_skin/locales/nl.lua @@ -1,4 +1,4 @@ -Locales["nl"] = { +return { ["skin_menu"] = "Kleding Menu", ["use_rotate_view"] = "gebruik Q en E om de camera te draaien.", ["skin"] = "verander outfit", diff --git a/[core]/esx_skin/locales/pl.lua b/[core]/esx_skin/locales/pl.lua index c12fe139..0c3a33a0 100644 --- a/[core]/esx_skin/locales/pl.lua +++ b/[core]/esx_skin/locales/pl.lua @@ -1,4 +1,4 @@ -Locales["pl"] = { +return { ["skin_menu"] = "menu wyglądu", ["use_rotate_view"] = "użyj Q i E aby obrócić ekran.", ["skin"] = "zmień wygląd", diff --git a/[core]/esx_skin/locales/pt.lua b/[core]/esx_skin/locales/pt.lua index 0109a66a..f22e2fae 100644 --- a/[core]/esx_skin/locales/pt.lua +++ b/[core]/esx_skin/locales/pt.lua @@ -1,4 +1,4 @@ -Locales["pt"] = { +return { ["skin_menu"] = "Menu de Skin", ["use_rotate_view"] = "Usa Q e E para rodar a câmara.", ["skin"] = "alterar skin", diff --git a/[core]/esx_skin/locales/sl.lua b/[core]/esx_skin/locales/sl.lua index d2f3571c..04ea3c3b 100644 --- a/[core]/esx_skin/locales/sl.lua +++ b/[core]/esx_skin/locales/sl.lua @@ -1,4 +1,4 @@ -Locales["sl"] = { +return { ["skin_menu"] = "Oblacilni menu.", ["use_rotate_view"] = "Pritisni Q in E da se obracas s pogledom.", ["skin"] = "Zamenjaj Skin.", diff --git a/[core]/esx_skin/locales/sr.lua b/[core]/esx_skin/locales/sr.lua index 9d6ee01d..03c55e47 100644 --- a/[core]/esx_skin/locales/sr.lua +++ b/[core]/esx_skin/locales/sr.lua @@ -1,4 +1,4 @@ -Locales["sr"] = { +return { ["skin_menu"] = "Skin Meni", ["use_rotate_view"] = "koristi Q i E da rotiras kameru.", ["skin"] = "promeni skin", diff --git a/[core]/esx_skin/locales/sv.lua b/[core]/esx_skin/locales/sv.lua index 1e14369a..bf7b4d2d 100644 --- a/[core]/esx_skin/locales/sv.lua +++ b/[core]/esx_skin/locales/sv.lua @@ -1,4 +1,4 @@ -Locales["sv"] = { +return { ["skin_menu"] = "Skin Meny", ["use_rotate_view"] = "Använd Q och E för att rotera.", ["skin"] = "Ända utseende", diff --git a/[core]/esx_skin/locales/zh-cn.lua b/[core]/esx_skin/locales/zh-cn.lua index c0402d43..52cc2339 100644 --- a/[core]/esx_skin/locales/zh-cn.lua +++ b/[core]/esx_skin/locales/zh-cn.lua @@ -1,4 +1,4 @@ -Locales["zh-cn"] = { +return { ["skin_menu"] = "皮肤选单", ["use_rotate_view"] = "使用 Q 和 E 旋转镜头视角.", ["skin"] = "更换皮肤数据", From b5edb1a746200d5252a22b8c14a7effdc43f96b0 Mon Sep 17 00:00:00 2001 From: fnbar <66674667+fnbar0@users.noreply.github.com> Date: Sun, 19 Jan 2025 15:35:42 +0100 Subject: [PATCH 30/69] Make scaleforms show duration frame independent --- .../es_extended/client/modules/scaleform.lua | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/[core]/es_extended/client/modules/scaleform.lua b/[core]/es_extended/client/modules/scaleform.lua index 31d0897e..1f807acb 100644 --- a/[core]/es_extended/client/modules/scaleform.lua +++ b/[core]/es_extended/client/modules/scaleform.lua @@ -3,11 +3,10 @@ ESX.Scaleform.Utils = {} function ESX.Scaleform.ShowFreemodeMessage(title, msg, sec) local scaleform = ESX.Scaleform.Utils.RunMethod("MP_BIG_MESSAGE_FREEMODE", "SHOW_SHARD_WASTED_MP_MESSAGE", false, title, msg) - - while sec > 0 do + + local startTimer = GetGameTimer() + while GetGameTimer() - startTimer < sec * 1000 do Wait(0) - sec = sec - 0.01 - DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end @@ -19,10 +18,9 @@ function ESX.Scaleform.ShowBreakingNews(title, msg, bottom, sec) ESX.Scaleform.Utils.RunMethod(scaleform, "SET_SCROLL_TEXT", false, 0, 0, title) ESX.Scaleform.Utils.RunMethod(scaleform, "DISPLAY_SCROLL_TEXT", false, 0, 0) - while sec > 0 do + local startTimer = GetGameTimer() + while GetGameTimer() - startTimer < sec * 1000 do Wait(0) - sec = sec - 0.01 - DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end @@ -32,10 +30,9 @@ end function ESX.Scaleform.ShowPopupWarning(title, msg, bottom, sec) local scaleform = ESX.Scaleform.Utils.RunMethod("POPUP_WARNING", "SHOW_POPUP_WARNING", false, 500.0, title, msg, bottom, true) - while sec > 0 do + local startTimer = GetGameTimer() + while GetGameTimer() - startTimer < sec * 1000 do Wait(0) - sec = sec - 0.01 - DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end @@ -45,10 +42,9 @@ end function ESX.Scaleform.ShowTrafficMovie(sec) local scaleform = ESX.Scaleform.Utils.RunMethod("TRAFFIC_CAM", "PLAY_CAM_MOVIE", false) - while sec > 0 do + local startTimer = GetGameTimer() + while GetGameTimer() - startTimer < sec * 1000 do Wait(0) - sec = sec - 0.01 - DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end From bdb74d05e900951ea429ea214a0889334f1236f2 Mon Sep 17 00:00:00 2001 From: fnbar <66674667+fnbar0@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:39:55 +0100 Subject: [PATCH 31/69] Remove unnecessary calculations in loop --- [core]/es_extended/client/modules/scaleform.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/[core]/es_extended/client/modules/scaleform.lua b/[core]/es_extended/client/modules/scaleform.lua index 1f807acb..16d4752d 100644 --- a/[core]/es_extended/client/modules/scaleform.lua +++ b/[core]/es_extended/client/modules/scaleform.lua @@ -4,8 +4,8 @@ ESX.Scaleform.Utils = {} function ESX.Scaleform.ShowFreemodeMessage(title, msg, sec) local scaleform = ESX.Scaleform.Utils.RunMethod("MP_BIG_MESSAGE_FREEMODE", "SHOW_SHARD_WASTED_MP_MESSAGE", false, title, msg) - local startTimer = GetGameTimer() - while GetGameTimer() - startTimer < sec * 1000 do + local endTime = GetGameTimer() + (sec * 1000) + while GetGameTimer() < endTime do Wait(0) DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end @@ -18,8 +18,8 @@ function ESX.Scaleform.ShowBreakingNews(title, msg, bottom, sec) ESX.Scaleform.Utils.RunMethod(scaleform, "SET_SCROLL_TEXT", false, 0, 0, title) ESX.Scaleform.Utils.RunMethod(scaleform, "DISPLAY_SCROLL_TEXT", false, 0, 0) - local startTimer = GetGameTimer() - while GetGameTimer() - startTimer < sec * 1000 do + local endTime = GetGameTimer() + (sec * 1000) + while GetGameTimer() < endTime do Wait(0) DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end @@ -30,8 +30,8 @@ end function ESX.Scaleform.ShowPopupWarning(title, msg, bottom, sec) local scaleform = ESX.Scaleform.Utils.RunMethod("POPUP_WARNING", "SHOW_POPUP_WARNING", false, 500.0, title, msg, bottom, true) - local startTimer = GetGameTimer() - while GetGameTimer() - startTimer < sec * 1000 do + local endTime = GetGameTimer() + (sec * 1000) + while GetGameTimer() < endTime do Wait(0) DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end @@ -42,8 +42,8 @@ end function ESX.Scaleform.ShowTrafficMovie(sec) local scaleform = ESX.Scaleform.Utils.RunMethod("TRAFFIC_CAM", "PLAY_CAM_MOVIE", false) - local startTimer = GetGameTimer() - while GetGameTimer() - startTimer < sec * 1000 do + local endTime = GetGameTimer() + (sec * 1000) + while GetGameTimer() < endTime do Wait(0) DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255, 0) end From df287b041b1ed84e24e1ae4dc095aed3dc9c9592 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:12:21 +0100 Subject: [PATCH 32/69] feat(es_extended): add static player methods --- [core]/es_extended/imports.lua | 13 +++++++++++++ [core]/es_extended/server/classes/player.lua | 10 ++++++++++ [core]/es_extended/server/functions.lua | 6 ++++++ 3 files changed, 29 insertions(+) diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua index 719d0623..bf5b9bee 100644 --- a/[core]/es_extended/imports.lua +++ b/[core]/es_extended/imports.lua @@ -42,6 +42,19 @@ if not IsDuplicityVersion() then -- Only register this event for the client return error(('\n^1Error loading module (%s)'):format(external[i])) end end +else + ESX.Player = setmetatable({}, { + __call = function(_, src) + if not ESX.IsPlayerLoaded(src) then return end + return setmetatable({src = src}, { + __index = function(self, method) + return function(...) + return exports.es_extended:RunStaticPlayerMethod(self.src, method, ...) + end + end + }) + end + }) end if GetResourceState("ox_lib") == "missing" then diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index b5e66e7b..d82cd695 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -944,3 +944,13 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, return self end + +local function runStaticPlayerMethod(src, method, ...) + local xPlayer = ESX.Players[src] + if not xPlayer then + return + end + + return xPlayer[method](...) +end +exports("RunStaticPlayerMethod", runStaticPlayerMethod) \ No newline at end of file diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 0ab74f2f..6a27581a 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -358,6 +358,12 @@ function ESX.GetPlayerFromIdentifier(identifier) return Core.playersByIdentifier[identifier] end +---@param source number +---@return boolean +function ESX.IsPlayerLoaded(source) + return ESX.Players[source] ~= nil +end + ---@param playerId number | string ---@return string function ESX.GetIdentifier(playerId) From 4c9a7d29180d084f4dfb55748d1adbb14d6ee9f2 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:24:20 +0100 Subject: [PATCH 33/69] feat(es_extended/imports): add support for resolving player identifier --- [core]/es_extended/imports.lua | 8 +++++++- [core]/es_extended/server/functions.lua | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua index bf5b9bee..3587951c 100644 --- a/[core]/es_extended/imports.lua +++ b/[core]/es_extended/imports.lua @@ -45,7 +45,13 @@ if not IsDuplicityVersion() then -- Only register this event for the client else ESX.Player = setmetatable({}, { __call = function(_, src) - if not ESX.IsPlayerLoaded(src) then return end + if type(src) ~= "number" then + src = ESX.GetPlayerIdFromIdentifier(src) + if not src then return end + elseif not ESX.IsPlayerLoaded(src) then + return + end + return setmetatable({src = src}, { __index = function(self, method) return function(...) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 6a27581a..d7900e46 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -358,6 +358,12 @@ function ESX.GetPlayerFromIdentifier(identifier) return Core.playersByIdentifier[identifier] end +---@param identifier string +---@return number playerId +function ESX.GetPlayerIdFromIdentifier(identifier) + return Core.playersByIdentifier[identifier]?.source +end + ---@param source number ---@return boolean function ESX.IsPlayerLoaded(source) From 54e0da8b33a05225b5da178b43a5556c67ac2599 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:24:45 +0100 Subject: [PATCH 34/69] refactor(es_extended/server/classes/player): add error msg for invalid functions --- [core]/es_extended/server/classes/player.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index d82cd695..ed99efb6 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -951,6 +951,10 @@ local function runStaticPlayerMethod(src, method, ...) return end + if not ESX.IsFunctionReference(xPlayer[method]) then + error(("Attempted to call invalid method on playerId %s: %s"):format(src, method)) + end + return xPlayer[method](...) end exports("RunStaticPlayerMethod", runStaticPlayerMethod) \ No newline at end of file From cd96d75ed9c0900a97d1421752fc009e1cacc9d7 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:28:10 +0100 Subject: [PATCH 35/69] refactor(es_extended/imports): fix styling --- [core]/es_extended/imports.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua index 3587951c..9bd1d4ff 100644 --- a/[core]/es_extended/imports.lua +++ b/[core]/es_extended/imports.lua @@ -47,7 +47,9 @@ else __call = function(_, src) if type(src) ~= "number" then src = ESX.GetPlayerIdFromIdentifier(src) - if not src then return end + if not src then + return + end elseif not ESX.IsPlayerLoaded(src) then return end From 7d9a64a524427c00f5865175e2a600d025dac094 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:30:28 +0100 Subject: [PATCH 36/69] feat(es_extended/server/classes/player): add getter for player source --- [core]/es_extended/server/classes/player.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index ed99efb6..376316c6 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -455,6 +455,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, return self.weight end + ---@return number + function self.getSource() + return self.source + end + ---@return number function self.getMaxWeight() return self.maxWeight From 1ad52fa3e2d0196e1d798341e8915678f4071084 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:33:11 +0100 Subject: [PATCH 37/69] feat(es_extended/server/classes/player): add isAdmin getter --- [core]/es_extended/server/classes/player.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index 376316c6..ec2e04d3 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -91,6 +91,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, return self.paycheckEnabled end + ---@return boolean + function self.isAdmin() + return Core.IsPlayerAdmin(self.source) + end + ---@param coordinates vector4 | vector3 | table ---@return nil function self.setCoords(coordinates) From 66bf71c254411cec0fa439dfa7ab34d9231da81e Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Wed, 22 Jan 2025 18:35:21 +0100 Subject: [PATCH 38/69] feat(es_extended/server/classes/player): add getter for playerId --- [core]/es_extended/server/classes/player.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index ec2e04d3..b4682df7 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -464,6 +464,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, function self.getSource() return self.source end + self.getPlayerId = self.getSource ---@return number function self.getMaxWeight() From db5128fcb6184e95a2f8f5752220cfb894ef4356 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:25:20 +0100 Subject: [PATCH 39/69] fix(es_extended/server/functions): fix admin logs --- [core]/es_extended/server/functions.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index d7900e46..8366c069 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -445,6 +445,11 @@ end ---@param fields table ---@return nil function ESX.DiscordLogFields(name, title, color, fields) + for i = 1, #fields do + local field = fields[i] + field.value = tostring(field.value) + end + local webHook = Config.DiscordLogs.Webhooks[name] or Config.DiscordLogs.Webhooks.default local embedData = { { From 34a5c00b5b241b8bf1298517d9e56e44c0c7a1fe Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Mon, 3 Feb 2025 17:03:24 +0100 Subject: [PATCH 40/69] fix(esx_multicharacter/server/modules/database): fix conn string parser --- .../esx_multicharacter/server/modules/database.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/[core]/esx_multicharacter/server/modules/database.lua b/[core]/esx_multicharacter/server/modules/database.lua index 0f3d7a3e..4bf4ee33 100644 --- a/[core]/esx_multicharacter/server/modules/database.lua +++ b/[core]/esx_multicharacter/server/modules/database.lua @@ -14,12 +14,12 @@ function Database:GetConnection() self.name = connectionString:sub(connectionString:find("/") + 1, -1):gsub("[%?]+[%w%p]*$", "") self.found = true else - local connectionExtracted = { string.strsplit(";", connectionString) } - - for i = 1, #connectionExtracted do - local v = connectionExtracted[i] - if v:match("database") then - self.name = connectionString:sub(connectionString:find("/") + 1, -1):gsub("[%?]+[%w%p]*$", "") + local confPairs = { string.strsplit(";", connectionString) } + for i = 1, #confPairs do + local confPair = confPairs[i] + local key, value = confPair:match("^%s*(.-)%s*=%s*(.-)%s*$") + if key == "database" then + self.name = value self.found = true break end From 6b4def278e8141fcc7eafde66b38bddf4707ecb0 Mon Sep 17 00:00:00 2001 From: Kasey Fitton Date: Fri, 7 Feb 2025 11:51:51 +0000 Subject: [PATCH 41/69] tweak(es_extended/shared/main): remove deprication message --- [core]/es_extended/shared/main.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/[core]/es_extended/shared/main.lua b/[core]/es_extended/shared/main.lua index 5d659daa..8c76a0ac 100644 --- a/[core]/es_extended/shared/main.lua +++ b/[core]/es_extended/shared/main.lua @@ -9,7 +9,6 @@ AddEventHandler("esx:getSharedObject", function(cb) cb(ESX) end local invokingResource = GetInvokingResource() - print(("^3[WARNING]^0 Resource ^5%s^0 used the ^5getSharedObject^0 event. This is not the recommended way to import ESX. Visit https://docs.esx-legacy.com/tutorials/tutorials-esx/sharedevent to find out why."):format(invokingResource)) end) -- backwards compatibility (DO NOT TOUCH !) From 901f16fb7ba61d5e9389ad8f5d1dee7fc97b6321 Mon Sep 17 00:00:00 2001 From: Kasey Fitton Date: Fri, 7 Feb 2025 13:52:31 +0000 Subject: [PATCH 42/69] fix(es_extended/shared/main): remove unused variable --- [core]/es_extended/shared/main.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/[core]/es_extended/shared/main.lua b/[core]/es_extended/shared/main.lua index 8c76a0ac..432cf03d 100644 --- a/[core]/es_extended/shared/main.lua +++ b/[core]/es_extended/shared/main.lua @@ -8,7 +8,6 @@ AddEventHandler("esx:getSharedObject", function(cb) if ESX.IsFunctionReference(cb) then cb(ESX) end - local invokingResource = GetInvokingResource() end) -- backwards compatibility (DO NOT TOUCH !) From 262ae32a8b0c984a5ec5b87a5bccf5fd0090d166 Mon Sep 17 00:00:00 2001 From: t1ger-scripts <67964693+t1ger-scripts@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:35:01 +0100 Subject: [PATCH 43/69] fix: missing attributes for unemployed Added missing attributes for unemployed job if no Jobs found --- [core]/es_extended/server/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 8366c069..d268681e 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -512,7 +512,7 @@ function ESX.RefreshJobs() if not Jobs then -- Fallback data, if no jobs exist - ESX.Jobs["unemployed"] = { label = "Unemployed", grades = { ["0"] = { grade = 0, label = "Unemployed", salary = 200, skin_male = {}, skin_female = {} } } } + ESX.Jobs["unemployed"] = { name = "unemployed", label = "Unemployed", grades = { ["0"] = { grade = 0, name = "unemployed", label = "Unemployed", salary = 200, skin_male = {}, skin_female = {} } } } else ESX.Jobs = Jobs end @@ -650,4 +650,4 @@ end ---@return CExtendedVehicle? function ESX.GetExtendedVehicleFromPlate(plate) return Core.vehicleClass.getFromPlate(plate) -end \ No newline at end of file +end From 6d7831b0d0cad47ae6a7714fed20d3ea4f214c0c Mon Sep 17 00:00:00 2001 From: t1ger-scripts <67964693+t1ger-scripts@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:56:59 +0100 Subject: [PATCH 44/69] fix(es_extended/server/functions): whitelisted attribute for unemployed Added the missing whitelisted attribute for defaulted unemployed job. --- [core]/es_extended/server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index d268681e..dd7c1408 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -512,7 +512,7 @@ function ESX.RefreshJobs() if not Jobs then -- Fallback data, if no jobs exist - ESX.Jobs["unemployed"] = { name = "unemployed", label = "Unemployed", grades = { ["0"] = { grade = 0, name = "unemployed", label = "Unemployed", salary = 200, skin_male = {}, skin_female = {} } } } + ESX.Jobs["unemployed"] = { name = "unemployed", label = "Unemployed", whitelisted = false, grades = { ["0"] = { grade = 0, name = "unemployed", label = "Unemployed", salary = 200, skin_male = {}, skin_female = {} } } } else ESX.Jobs = Jobs end From 364dfc03c6f1185362eaa5b03cc6061abc3221ae Mon Sep 17 00:00:00 2001 From: t1ger-scripts <67964693+t1ger-scripts@users.noreply.github.com> Date: Mon, 17 Feb 2025 18:02:44 +0100 Subject: [PATCH 45/69] fix(server/modules/createJob): job grades not inserting The queries assume that the parsed grades are numerically indexed. But removing ipairs method, and using pairs method, allows to loop grades that are indexed with strings as well. Just like we are using pairs method inside generatenewJobTable --- [core]/es_extended/server/modules/createJob.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[core]/es_extended/server/modules/createJob.lua b/[core]/es_extended/server/modules/createJob.lua index c4c09eff..e6f47782 100644 --- a/[core]/es_extended/server/modules/createJob.lua +++ b/[core]/es_extended/server/modules/createJob.lua @@ -72,10 +72,10 @@ function ESX.CreateJob(name, label, grades) { query = 'INSERT INTO jobs (name, label) VALUES (?, ?)', values = { name, label } } } - for _, grade in ipairs(grades) do + for _, grade in pairs(grades) do queries[#queries + 1] = { query = 'INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES (?, ?, ?, ?, ?, ?, ?)', - values = { name, grade.grade, grade.name, grade.label, grade.salary, '{}', '{}' } + values = { name, grade.grade, grade.name, grade.label, grade.salary, json.encode(grade.skin_male) or '{}', json.encode(grade.skin_female) or '{}' } } end From 5ddd20080222cd809451084aa46af506aa050195 Mon Sep 17 00:00:00 2001 From: t1ger-scripts <67964693+t1ger-scripts@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:36:53 +0100 Subject: [PATCH 46/69] fix(server/modules/createJob): skin nil check before json encode Added checks for skin_male and skin_female before json encoding to prevent 'NULL' entries in database --- [core]/es_extended/server/modules/createJob.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/modules/createJob.lua b/[core]/es_extended/server/modules/createJob.lua index e6f47782..d2079512 100644 --- a/[core]/es_extended/server/modules/createJob.lua +++ b/[core]/es_extended/server/modules/createJob.lua @@ -75,7 +75,7 @@ function ESX.CreateJob(name, label, grades) for _, grade in pairs(grades) do queries[#queries + 1] = { query = 'INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES (?, ?, ?, ?, ?, ?, ?)', - values = { name, grade.grade, grade.name, grade.label, grade.salary, json.encode(grade.skin_male) or '{}', json.encode(grade.skin_female) or '{}' } + values = { name, grade.grade, grade.name, grade.label, grade.salary, grade.skin_male and json.encode(grade.skin_male) or '{}', grade.skin_female and json.encode(grade.skin_female) or '{}' } } end From b66909c33d3248e4a5c48a02ac6211091e37f677 Mon Sep 17 00:00:00 2001 From: t1ger-scripts <67964693+t1ger-scripts@users.noreply.github.com> Date: Tue, 18 Feb 2025 22:28:02 +0100 Subject: [PATCH 47/69] feat(modules/createJob): triggerevent for created jobs Added a TriggerEvent when a job is created successfully, allowing developers to use an event listener and update ESX.Jobs, instead of importing the whole ESX object. --- [core]/es_extended/server/modules/createJob.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/[core]/es_extended/server/modules/createJob.lua b/[core]/es_extended/server/modules/createJob.lua index d2079512..35d6daab 100644 --- a/[core]/es_extended/server/modules/createJob.lua +++ b/[core]/es_extended/server/modules/createJob.lua @@ -90,5 +90,7 @@ function ESX.CreateJob(name, label, grades) notify("SUCCESS", currentResourceName, 'Job created successfully: `%s`', name) + TriggerEvent('esx:jobCreated', name, ESX.Jobs[name]) + return success end From 3dae29d7dc49f14c29248949152dc47d641ac8aa Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 15:44:09 -0500 Subject: [PATCH 48/69] Fix ox crash --- [core]/es_extended/server/modules/commands.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index 628e85ea..a040f44d 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -204,9 +204,13 @@ ESX.RegisterCommand( "setaccountmoney", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_giveaccountmoney_invalid")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.setAccountMoney(args.account, args.amount, "Government Grant") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Set Account Money /setaccountmoney Triggered!", "pink", { @@ -234,9 +238,13 @@ ESX.RegisterCommand( "giveaccountmoney", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_giveaccountmoney_invalid")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addAccountMoney(args.account, args.amount, "Government Grant") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Account Money /giveaccountmoney Triggered!", "pink", { From d9fe2d8051c82c4769b7b66502f969afd8be9d4a Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 15:45:27 -0500 Subject: [PATCH 49/69] Fix oc crash and the impossibility to give anymore money --- [core]/es_extended/server/modules/commands.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index a040f44d..44cd4699 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -272,9 +272,13 @@ ESX.RegisterCommand( "removeaccountmoney", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_removeaccountmoney_invalid")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.removeAccountMoney(args.account, args.amount, "Government Tax") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Remove Account Money /removeaccountmoney Triggered!", "pink", { From 5e91bad5c4b61b37675c4752f39fa8da1e7c3b52 Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 15:47:32 -0500 Subject: [PATCH 50/69] feat(commands): add maximum amount validation for giveitem, giveweapon, and giveammo commands --- [core]/es_extended/server/modules/commands.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index 44cd4699..98c9fff6 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -307,6 +307,10 @@ if not Config.CustomInventory then "giveitem", "admin", function(xPlayer, args) + local MAX_AMOUNT = 1.79769e+308 + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addInventoryItem(args.item, args.count) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Item /giveitem Triggered!", "pink", { @@ -334,9 +338,13 @@ if not Config.CustomInventory then "giveweapon", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveweapon_hasalready")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addWeapon(args.weapon, args.ammo) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Weapon /giveweapon Triggered!", "pink", { @@ -364,9 +372,13 @@ if not Config.CustomInventory then "giveammo", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveammo_noweapon_found")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addWeaponAmmo(args.weapon, args.ammo) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Ammunition /giveammo Triggered!", "pink", { From 221e23b2b7289701f10ff85f297447728c4ce4d5 Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 15:44:09 -0500 Subject: [PATCH 51/69] feat(commands): prevent Ox from breaking due to money overflow --- [core]/es_extended/server/modules/commands.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index 628e85ea..a040f44d 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -204,9 +204,13 @@ ESX.RegisterCommand( "setaccountmoney", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_giveaccountmoney_invalid")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.setAccountMoney(args.account, args.amount, "Government Grant") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Set Account Money /setaccountmoney Triggered!", "pink", { @@ -234,9 +238,13 @@ ESX.RegisterCommand( "giveaccountmoney", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_giveaccountmoney_invalid")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addAccountMoney(args.account, args.amount, "Government Grant") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Account Money /giveaccountmoney Triggered!", "pink", { From 91e783c9e96eca907151858e805b4b5337b81b82 Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 15:45:27 -0500 Subject: [PATCH 52/69] feat(commands): prevent money overflow from blocking further transactions --- [core]/es_extended/server/modules/commands.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index a040f44d..44cd4699 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -272,9 +272,13 @@ ESX.RegisterCommand( "removeaccountmoney", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_removeaccountmoney_invalid")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.removeAccountMoney(args.account, args.amount, "Government Tax") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Remove Account Money /removeaccountmoney Triggered!", "pink", { From a0389d7e511caf3e5c861685f743639968a3b3d3 Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 15:47:32 -0500 Subject: [PATCH 53/69] feat(commands): add max amount validation for giveitem, giveweapon, and giveammo --- [core]/es_extended/server/modules/commands.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index 44cd4699..98c9fff6 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -307,6 +307,10 @@ if not Config.CustomInventory then "giveitem", "admin", function(xPlayer, args) + local MAX_AMOUNT = 1.79769e+308 + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addInventoryItem(args.item, args.count) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Item /giveitem Triggered!", "pink", { @@ -334,9 +338,13 @@ if not Config.CustomInventory then "giveweapon", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveweapon_hasalready")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addWeapon(args.weapon, args.ammo) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Weapon /giveweapon Triggered!", "pink", { @@ -364,9 +372,13 @@ if not Config.CustomInventory then "giveammo", "admin", function(xPlayer, args, showError) + local MAX_AMOUNT = 1.79769e+308 if not args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveammo_noweapon_found")) end + if args.amount > MAX_AMOUNT then + return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + end args.playerId.addWeaponAmmo(args.weapon, args.ammo) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Ammunition /giveammo Triggered!", "pink", { From b60eb3b43cac288f1a0894c05609bc8c181d5fdb Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 17:05:23 -0500 Subject: [PATCH 54/69] feat(commands): rename amount to count for giveitem and update ammo validation for giveweapon and giveammo --- [core]/es_extended/server/modules/commands.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index 98c9fff6..5216b2f3 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -307,9 +307,9 @@ if not Config.CustomInventory then "giveitem", "admin", function(xPlayer, args) - local MAX_AMOUNT = 1.79769e+308 - if args.amount > MAX_AMOUNT then - return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + local MAX_COUNT = 1.79769e+308 + if args.count > MAX_COUNT then + return showError(("Count must be between 1 and %s"):format(MAX_COUNT)) end args.playerId.addInventoryItem(args.item, args.count) if Config.AdminLogging then @@ -338,12 +338,12 @@ if not Config.CustomInventory then "giveweapon", "admin", function(xPlayer, args, showError) - local MAX_AMOUNT = 1.79769e+308 + local MAX_AMMO = 1.79769e+308 if args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveweapon_hasalready")) end - if args.amount > MAX_AMOUNT then - return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + if args.ammo > MAX_AMMO then + return showError(("Ammo must be between 1 and %s"):format(MAX_AMMO)) end args.playerId.addWeapon(args.weapon, args.ammo) if Config.AdminLogging then @@ -372,12 +372,12 @@ if not Config.CustomInventory then "giveammo", "admin", function(xPlayer, args, showError) - local MAX_AMOUNT = 1.79769e+308 + local MAX_AMMO = 1.79769e+308 if not args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveammo_noweapon_found")) end - if args.amount > MAX_AMOUNT then - return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) + if args.ammo > MAX_AMMO then + return showError(("Ammo must be between 1 and %s"):format(MAX_AMMO)) end args.playerId.addWeaponAmmo(args.weapon, args.ammo) if Config.AdminLogging then From f2cde312514d47ab3891a2473c8b46657b47023b Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 21:55:24 -0500 Subject: [PATCH 55/69] feat(commands): remove maximum amount validation for account money and item commands --- .../es_extended/server/modules/commands.lua | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/[core]/es_extended/server/modules/commands.lua b/[core]/es_extended/server/modules/commands.lua index 5216b2f3..628e85ea 100644 --- a/[core]/es_extended/server/modules/commands.lua +++ b/[core]/es_extended/server/modules/commands.lua @@ -204,13 +204,9 @@ ESX.RegisterCommand( "setaccountmoney", "admin", function(xPlayer, args, showError) - local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_giveaccountmoney_invalid")) end - if args.amount > MAX_AMOUNT then - return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) - end args.playerId.setAccountMoney(args.account, args.amount, "Government Grant") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Set Account Money /setaccountmoney Triggered!", "pink", { @@ -238,13 +234,9 @@ ESX.RegisterCommand( "giveaccountmoney", "admin", function(xPlayer, args, showError) - local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_giveaccountmoney_invalid")) end - if args.amount > MAX_AMOUNT then - return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) - end args.playerId.addAccountMoney(args.account, args.amount, "Government Grant") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Account Money /giveaccountmoney Triggered!", "pink", { @@ -272,13 +264,9 @@ ESX.RegisterCommand( "removeaccountmoney", "admin", function(xPlayer, args, showError) - local MAX_AMOUNT = 1.79769e+308 if not args.playerId.getAccount(args.account) then return showError(TranslateCap("command_removeaccountmoney_invalid")) end - if args.amount > MAX_AMOUNT then - return showError(("Amount must be between 1 and %s"):format(MAX_AMOUNT)) - end args.playerId.removeAccountMoney(args.account, args.amount, "Government Tax") if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Remove Account Money /removeaccountmoney Triggered!", "pink", { @@ -307,10 +295,6 @@ if not Config.CustomInventory then "giveitem", "admin", function(xPlayer, args) - local MAX_COUNT = 1.79769e+308 - if args.count > MAX_COUNT then - return showError(("Count must be between 1 and %s"):format(MAX_COUNT)) - end args.playerId.addInventoryItem(args.item, args.count) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Item /giveitem Triggered!", "pink", { @@ -338,13 +322,9 @@ if not Config.CustomInventory then "giveweapon", "admin", function(xPlayer, args, showError) - local MAX_AMMO = 1.79769e+308 if args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveweapon_hasalready")) end - if args.ammo > MAX_AMMO then - return showError(("Ammo must be between 1 and %s"):format(MAX_AMMO)) - end args.playerId.addWeapon(args.weapon, args.ammo) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Weapon /giveweapon Triggered!", "pink", { @@ -372,13 +352,9 @@ if not Config.CustomInventory then "giveammo", "admin", function(xPlayer, args, showError) - local MAX_AMMO = 1.79769e+308 if not args.playerId.hasWeapon(args.weapon) then return showError(TranslateCap("command_giveammo_noweapon_found")) end - if args.ammo > MAX_AMMO then - return showError(("Ammo must be between 1 and %s"):format(MAX_AMMO)) - end args.playerId.addWeaponAmmo(args.weapon, args.ammo) if Config.AdminLogging then ESX.DiscordLogFields("UserActions", "Give Ammunition /giveammo Triggered!", "pink", { From 7877d9e40a5a9f72d7f898a5a4ab9f751e723256 Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 21:58:23 -0500 Subject: [PATCH 56/69] feat(inventory): implement maximum amount cap for account money transactions --- [core]/es_extended/server/classes/overrides/oxinventory.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/[core]/es_extended/server/classes/overrides/oxinventory.lua b/[core]/es_extended/server/classes/overrides/oxinventory.lua index c3be26a8..64bdd550 100644 --- a/[core]/es_extended/server/classes/overrides/oxinventory.lua +++ b/[core]/es_extended/server/classes/overrides/oxinventory.lua @@ -1,4 +1,5 @@ local Inventory +local MAX_AMOUNT = 1.79769e+308 if Config.CustomInventory ~= "ox" then return end @@ -45,6 +46,7 @@ Core.PlayerFunctionOverrides.OxInventory = { setAccountMoney = function(self) return function(accountName, money, reason) reason = reason or "unknown" + money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money < 0 then return end local account = self.getAccount(accountName) @@ -64,6 +66,7 @@ Core.PlayerFunctionOverrides.OxInventory = { addAccountMoney = function(self) return function(accountName, money, reason) reason = reason or "unknown" + money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money < 1 then return end local account = self.getAccount(accountName) @@ -82,6 +85,7 @@ Core.PlayerFunctionOverrides.OxInventory = { removeAccountMoney = function(self) return function(accountName, money, reason) reason = reason or "unknown" + money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money < 1 then return end local account = self.getAccount(accountName) From 90ba45075ef1e0e36e6367716fbb4b50d7a173e6 Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 22:01:15 -0500 Subject: [PATCH 57/69] feat(player): enforce maximum amount limit for account money transactions --- [core]/es_extended/server/classes/player.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index b4682df7..a454cbfc 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -31,6 +31,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, weight, job, loadout, name, coords, metadata) ---@class xPlayer local self = {} + local MAX_AMOUNT = 1.79769e+308 self.accounts = accounts self.coords = coords @@ -313,6 +314,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, error(("Tried To Set Account ^5%s^1 For Player ^5%s^1 To An Invalid Number -> ^5%s^1"):format(accountName, self.playerId, money)) return end + money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money >= 0 then local account = self.getAccount(accountName) @@ -340,6 +342,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, error(("Tried To Set Account ^5%s^1 For Player ^5%s^1 To An Invalid Number -> ^5%s^1"):format(accountName, self.playerId, money)) return end + money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money > 0 then local account = self.getAccount(accountName) if account then @@ -366,6 +369,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, error(("Tried To Set Account ^5%s^1 For Player ^5%s^1 To An Invalid Number -> ^5%s^1"):format(accountName, self.playerId, money)) return end + money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money > 0 then local account = self.getAccount(accountName) From 6693a7f5034d4e86e60fb23a6d1386003767b74d Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Tue, 25 Feb 2025 22:59:31 -0500 Subject: [PATCH 58/69] feat(player): update inventory item addition to enforce maximum count limit --- [core]/es_extended/server/classes/player.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index a454cbfc..49e5cfa4 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -407,15 +407,14 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, ---@return nil function self.addInventoryItem(itemName, count) local item = self.getInventoryItem(itemName) + if not item then return end - if item then - count = ESX.Math.Round(count) - item.count = item.count + count - self.weight = self.weight + (item.weight * count) + count += item.count + item.count = (count <= MAX_AMOUNT and count) or MAX_AMOUNT + self.weight += (item.weight * count) - TriggerEvent("esx:onAddInventoryItem", self.source, item.name, item.count) - self.triggerEvent("esx:addInventoryItem", item.name, item.count) - end + TriggerEvent("esx:onAddInventoryItem", self.source, item.name, item.count) + self.triggerEvent("esx:addInventoryItem", item.name, item.count) end ---@param itemName string From 9083a7152645632cb2e84616e2a300d5aa3dabfb Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 2 Mar 2025 11:49:04 +0200 Subject: [PATCH 59/69] fix(functions.lua): IsPlayerAdmin group fix Function failed to properly detect is player admin or not, while GetPlayerFromId function was receiving a string instead of number. --- [core]/es_extended/server/functions.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 12417065..2a57fc0f 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -612,11 +612,14 @@ end ---@param playerId string | number ---@return boolean function Core.IsPlayerAdmin(playerId) - playerId = tostring(playerId) - if (IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true") then + local playerSrc = tostring(playerId) + + if IsPlayerAceAllowed(playerSrc, "command") or GetConvar("sv_lan", "") == "true" then return true end - local xPlayer = ESX.Players[playerId] - return (xPlayer and Config.AdminGroups[xPlayer.group] and true) or false + local xPlayer = ESX.GetPlayerFromId(tonumber(playerId)) + if not xPlayer then return false end + + return Config.AdminGroups[xPlayer.getGroup()] or false end From 80d934ac599a6573ac45bb3451219aa357a6a361 Mon Sep 17 00:00:00 2001 From: YOMAN1792 Date: Mon, 3 Mar 2025 21:33:05 -0500 Subject: [PATCH 60/69] feat(player): refine inventory item count handling with rounding and maximum limit enforcement. --- [core]/es_extended/server/classes/player.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index 49e5cfa4..e0076c56 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -407,10 +407,9 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, ---@return nil function self.addInventoryItem(itemName, count) local item = self.getInventoryItem(itemName) - if not item then return end count += item.count - item.count = (count <= MAX_AMOUNT and count) or MAX_AMOUNT + item.count = ESX.Math.Round(count) <= MAX_AMOUNT and ESX.Math.Round(count) or MAX_AMOUNT self.weight += (item.weight * count) TriggerEvent("esx:onAddInventoryItem", self.source, item.name, item.count) From 22d191b51edea0a97a0e5a0765d0e84a0dc0025a Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Tue, 4 Mar 2025 14:06:50 +0100 Subject: [PATCH 61/69] Revert "feat(es_extended/server/modules/commands.lua): Add Validation Number" --- .../server/classes/overrides/oxinventory.lua | 4 ---- [core]/es_extended/server/classes/player.lua | 16 +++++++--------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/[core]/es_extended/server/classes/overrides/oxinventory.lua b/[core]/es_extended/server/classes/overrides/oxinventory.lua index 64bdd550..c3be26a8 100644 --- a/[core]/es_extended/server/classes/overrides/oxinventory.lua +++ b/[core]/es_extended/server/classes/overrides/oxinventory.lua @@ -1,5 +1,4 @@ local Inventory -local MAX_AMOUNT = 1.79769e+308 if Config.CustomInventory ~= "ox" then return end @@ -46,7 +45,6 @@ Core.PlayerFunctionOverrides.OxInventory = { setAccountMoney = function(self) return function(accountName, money, reason) reason = reason or "unknown" - money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money < 0 then return end local account = self.getAccount(accountName) @@ -66,7 +64,6 @@ Core.PlayerFunctionOverrides.OxInventory = { addAccountMoney = function(self) return function(accountName, money, reason) reason = reason or "unknown" - money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money < 1 then return end local account = self.getAccount(accountName) @@ -85,7 +82,6 @@ Core.PlayerFunctionOverrides.OxInventory = { removeAccountMoney = function(self) return function(accountName, money, reason) reason = reason or "unknown" - money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money < 1 then return end local account = self.getAccount(accountName) diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index e0076c56..b4682df7 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -31,7 +31,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, weight, job, loadout, name, coords, metadata) ---@class xPlayer local self = {} - local MAX_AMOUNT = 1.79769e+308 self.accounts = accounts self.coords = coords @@ -314,7 +313,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, error(("Tried To Set Account ^5%s^1 For Player ^5%s^1 To An Invalid Number -> ^5%s^1"):format(accountName, self.playerId, money)) return end - money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money >= 0 then local account = self.getAccount(accountName) @@ -342,7 +340,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, error(("Tried To Set Account ^5%s^1 For Player ^5%s^1 To An Invalid Number -> ^5%s^1"):format(accountName, self.playerId, money)) return end - money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money > 0 then local account = self.getAccount(accountName) if account then @@ -369,7 +366,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, error(("Tried To Set Account ^5%s^1 For Player ^5%s^1 To An Invalid Number -> ^5%s^1"):format(accountName, self.playerId, money)) return end - money = money <= MAX_AMOUNT and money or MAX_AMOUNT if money > 0 then local account = self.getAccount(accountName) @@ -408,12 +404,14 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, function self.addInventoryItem(itemName, count) local item = self.getInventoryItem(itemName) - count += item.count - item.count = ESX.Math.Round(count) <= MAX_AMOUNT and ESX.Math.Round(count) or MAX_AMOUNT - self.weight += (item.weight * count) + if item then + count = ESX.Math.Round(count) + item.count = item.count + count + self.weight = self.weight + (item.weight * count) - TriggerEvent("esx:onAddInventoryItem", self.source, item.name, item.count) - self.triggerEvent("esx:addInventoryItem", item.name, item.count) + TriggerEvent("esx:onAddInventoryItem", self.source, item.name, item.count) + self.triggerEvent("esx:addInventoryItem", item.name, item.count) + end end ---@param itemName string From 638ce3a276af997df59567562c2d4fefbb337edd Mon Sep 17 00:00:00 2001 From: nexis Date: Thu, 6 Mar 2025 09:41:03 +0100 Subject: [PATCH 62/69] fix(es_extended/server/main): GlobalState jobcount infinitely increasing --- [core]/es_extended/server/main.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index fe0821a0..845bc7e9 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -353,6 +353,11 @@ end) AddEventHandler("esx:playerLogout", function(playerId, cb) local xPlayer = ESX.GetPlayerFromId(playerId) + local job = xPlayer.getJob().name + + Core.JobsPlayerCount[job] = Core.JobsPlayerCount[job] - 1 + GlobalState[("%s:count"):format(job)] = Core.JobsPlayerCount[job] + if xPlayer then TriggerEvent("esx:playerDropped", playerId) From 88a415a2b6383b86a34be76068cca54cd55972cb Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 9 Mar 2025 23:29:52 +0200 Subject: [PATCH 63/69] Update functions.lua --- [core]/es_extended/server/functions.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 2a57fc0f..447a3e51 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -612,13 +612,11 @@ end ---@param playerId string | number ---@return boolean function Core.IsPlayerAdmin(playerId) - local playerSrc = tostring(playerId) - - if IsPlayerAceAllowed(playerSrc, "command") or GetConvar("sv_lan", "") == "true" then + if IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true" then return true end - local xPlayer = ESX.GetPlayerFromId(tonumber(playerId)) + local xPlayer = ESX.GetPlayerFromId(playerId) if not xPlayer then return false end return Config.AdminGroups[xPlayer.getGroup()] or false From eb1a2b992371bfa4685eabeced7421f5b2e0cbfd Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 9 Mar 2025 23:39:57 +0200 Subject: [PATCH 64/69] Update functions.lua --- [core]/es_extended/server/functions.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 447a3e51..b571501c 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -609,15 +609,21 @@ function ESX.DoesJobExist(job, grade) return (ESX.Jobs[job] and ESX.Jobs[job].grades[tostring(grade)] ~= nil) or false end ----@param playerId string | number +---@param playerSrc number ---@return boolean -function Core.IsPlayerAdmin(playerId) - if IsPlayerAceAllowed(playerId, "command") or GetConvar("sv_lan", "") == "true" then +function Core.IsPlayerAdmin(playerSrc) + if type(playerSrc) ~= "number" then + return false + end + + if IsPlayerAceAllowed(tostring(playerSrc), "command") or GetConvar("sv_lan", "") == "true" then return true end - local xPlayer = ESX.GetPlayerFromId(playerId) - if not xPlayer then return false end + local xPlayer = ESX.GetPlayerFromId(playerSrc) + if not xPlayer then + return false + end return Config.AdminGroups[xPlayer.getGroup()] or false end From 23915d15088e23459381137c7847106c0c2515e6 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sun, 9 Mar 2025 23:42:54 +0200 Subject: [PATCH 65/69] Update functions.lua --- [core]/es_extended/server/functions.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index b571501c..ccdfb584 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -621,9 +621,5 @@ function Core.IsPlayerAdmin(playerSrc) end local xPlayer = ESX.GetPlayerFromId(playerSrc) - if not xPlayer then - return false - end - - return Config.AdminGroups[xPlayer.getGroup()] or false + return xPlayer and Config.AdminGroups[xPlayer.getGroup()] or false end From 5bb75de78fb16ffe868e44469f1e91ef90faedc3 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Mon, 10 Mar 2025 00:11:09 +0200 Subject: [PATCH 66/69] Update functions.lua --- [core]/es_extended/server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 501ff357..5ba47867 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -633,7 +633,7 @@ function Core.IsPlayerAdmin(playerSrc) return false end - if IsPlayerAceAllowed(tostring(playerSrc), "command") or GetConvar("sv_lan", "") == "true" then + if IsPlayerAceAllowed(playerSrc --[[@as string]], "command") or GetConvar("sv_lan", "") == "true" then return true end From 532070b72dd86667c46c8845603bcb14f464477a Mon Sep 17 00:00:00 2001 From: Mirow Date: Tue, 1 Apr 2025 17:56:50 +0200 Subject: [PATCH 67/69] feat(callback): add `AwaitClientCallback` function --- .../es_extended/client/modules/callback.lua | 47 +++++++++---------- .../es_extended/server/modules/callback.lua | 36 +++++++++++++- 2 files changed, 57 insertions(+), 26 deletions(-) diff --git a/[core]/es_extended/client/modules/callback.lua b/[core]/es_extended/client/modules/callback.lua index 6bd2d758..85facbb7 100644 --- a/[core]/es_extended/client/modules/callback.lua +++ b/[core]/es_extended/client/modules/callback.lua @@ -14,8 +14,25 @@ Callbacks.id = 0 -- MARK: Internal Functions -- ============================================= -function Callbacks:Trigger(event, cb, invoker, ...) +function Callbacks:Register(name, resource, cb) + self.storage[name] = { + resource = resource, + cb = cb + } +end + +function Callbacks:Execute(cb, id, ...) + local success, errorString = pcall(cb, ...) + + if not success then + print(("[^1ERROR^7] Failed to execute Callback with RequestId: ^5%s^7"):format(id)) + error(errorString) + return + end +end + +function Callbacks:Trigger(event, cb, invoker, ...) self.requests[self.id] = { await = type(cb) == "boolean", cb = cb or promise:new() @@ -29,16 +46,6 @@ function Callbacks:Trigger(event, cb, invoker, ...) return table.cb end -function Callbacks:Execute(cb, id, ...) - local success, errorString = pcall(cb, ...) - - if not success then - print(("[^1ERROR^7] Failed to execute Callback with RequestId: ^5%s^7"):format(id)) - error(errorString) - return - end -end - function Callbacks:ServerRecieve(requestId, invoker, ...) if not self.requests[requestId] then return error(("Server Callback with requestId ^5%s^1 Was Called by ^5%s^1 but does not exist."):format(requestId, invoker)) @@ -49,21 +56,13 @@ function Callbacks:ServerRecieve(requestId, invoker, ...) self.requests[requestId] = nil if callback.await then - callback.cb:resolve({...}) + callback.cb:resolve({ ... }) else self:Execute(callback.cb, requestId, ...) end end -function Callbacks:Register(name, resource, cb) - self.storage[name] = { - resource = resource, - cb = cb - } -end - function Callbacks:ClientRecieve(eventName, requestId, invoker, ...) - if not self.storage[eventName] then return error(("Client Callback with requestId ^5%s^1 Was Called by ^5%s^1 but does not exist."):format(eventName, invoker)) end @@ -130,14 +129,14 @@ end -- MARK: Events -- ============================================= -ESX.SecureNetEvent("esx:triggerClientCallback", function(...) - Callbacks:ClientRecieve(...) -end) - ESX.SecureNetEvent("esx:serverCallback", function(...) Callbacks:ServerRecieve(...) end) +ESX.SecureNetEvent("esx:triggerClientCallback", function(...) + Callbacks:ClientRecieve(...) +end) + AddEventHandler("onResourceStop", function(resource) for k, v in pairs(Callbacks.storage) do if v.resource == resource then diff --git a/[core]/es_extended/server/modules/callback.lua b/[core]/es_extended/server/modules/callback.lua index 3301e6a6..fc89a855 100644 --- a/[core]/es_extended/server/modules/callback.lua +++ b/[core]/es_extended/server/modules/callback.lua @@ -33,11 +33,17 @@ function Callbacks:Execute(cb, ...) end function Callbacks:Trigger(player, event, cb, invoker, ...) - self.requests[self.id] = cb + self.requests[self.id] = { + await = type(cb) == "boolean", + cb = cb or promise:new() + } + local table = self.requests[self.id] TriggerClientEvent("esx:triggerClientCallback", player, event, self.id, invoker, ...) self.id += 1 + + return table.cb end function Callbacks:ServerRecieve(player, event, requestId, invoker, ...) @@ -64,8 +70,12 @@ function Callbacks:RecieveClient(requestId, invoker, ...) local callback = self.requests[self.currentId] - self:Execute(callback, ...) self.requests[requestId] = nil + if callback.await then + callback.cb:resolve({ ... }) + else + self:Execute(callback.cb, ...) + end end -- ============================================= @@ -83,6 +93,28 @@ function ESX.TriggerClientCallback(player, eventName, callback, ...) Callbacks:Trigger(player, eventName, callback, invoker, ...) end +---@param player number playerId +---@param eventName string +---@param ... any +---@return any +function ESX.AwaitClientCallback(player, eventName, ...) + local invokingResource = GetInvokingResource() + local invoker = (invokingResource and invokingResource ~= "Unknown") and invokingResource or "es_extended" + + local p = Callbacks:Trigger(player, eventName, false, invoker, ...) + if not p then return end + + SetTimeout(15000, function() + if p.state == "pending" then + p:reject("Server Callback Timed Out") + end + end) + + Citizen.Await(p) + + return table.unpack(p.value) +end + ---@param eventName string ---@param callback function ---@return nil From aba21e2c036caa770cf81fb8e19745f1691253a6 Mon Sep 17 00:00:00 2001 From: Mirow Date: Fri, 4 Apr 2025 16:59:08 +0200 Subject: [PATCH 68/69] feat(paycheck): add event --- .../es_extended/server/modules/paycheck.lua | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/[core]/es_extended/server/modules/paycheck.lua b/[core]/es_extended/server/modules/paycheck.lua index 54881709..cb7de3a9 100644 --- a/[core]/es_extended/server/modules/paycheck.lua +++ b/[core]/es_extended/server/modules/paycheck.lua @@ -9,29 +9,30 @@ function StartPayCheck() local salary = (job == "unemployed" or onDuty) and xPlayer.job.grade_salary or ESX.Math.Round(xPlayer.job.grade_salary * Config.OffDutyPaycheckMultiplier) if xPlayer.paycheckEnabled then + TriggerEvent("esx:paycheckReceived", xPlayer.source, salary, job, jobLabel, onDuty) if salary > 0 then if job == "unemployed" then -- unemployed xPlayer.addAccountMoney("bank", salary, "Welfare Check") TriggerClientEvent("esx:showAdvancedNotification", player, TranslateCap("bank"), TranslateCap("received_paycheck"), TranslateCap("received_help", salary), "CHAR_BANK_MAZE", 9) if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - Unemployment Benefits", "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end - elseif Config.EnableSocietyPayouts then -- possibly a society + elseif Config.EnableSocietyPayouts then -- possibly a society TriggerEvent("esx_society:getSociety", xPlayer.job.name, function(society) - if society ~= nil then -- verified society + if society ~= nil then -- verified society TriggerEvent("esx_addonaccount:getSharedAccount", society.account, function(account) if account.money >= salary then -- does the society money to pay its employees? xPlayer.addAccountMoney("bank", salary, "Paycheck") account.removeMoney(salary) if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - " .. jobLabel, "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end @@ -44,9 +45,9 @@ function StartPayCheck() xPlayer.addAccountMoney("bank", salary, "Paycheck") if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - " .. jobLabel, "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end TriggerClientEvent("esx:showAdvancedNotification", player, TranslateCap("bank"), TranslateCap("received_paycheck"), TranslateCap("received_salary", salary), "CHAR_BANK_MAZE", 9) @@ -56,9 +57,9 @@ function StartPayCheck() xPlayer.addAccountMoney("bank", salary, "Paycheck") if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - Generic", "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end TriggerClientEvent("esx:showAdvancedNotification", player, TranslateCap("bank"), TranslateCap("received_paycheck"), TranslateCap("received_salary", salary), "CHAR_BANK_MAZE", 9) From 9f0bafef3d607f6e3c87e79bc35d03bc394daf97 Mon Sep 17 00:00:00 2001 From: Mirow Date: Fri, 4 Apr 2025 17:02:10 +0200 Subject: [PATCH 69/69] Revert "feat(paycheck): add event" This reverts commit aba21e2c036caa770cf81fb8e19745f1691253a6. --- .../es_extended/server/modules/paycheck.lua | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/[core]/es_extended/server/modules/paycheck.lua b/[core]/es_extended/server/modules/paycheck.lua index cb7de3a9..54881709 100644 --- a/[core]/es_extended/server/modules/paycheck.lua +++ b/[core]/es_extended/server/modules/paycheck.lua @@ -9,30 +9,29 @@ function StartPayCheck() local salary = (job == "unemployed" or onDuty) and xPlayer.job.grade_salary or ESX.Math.Round(xPlayer.job.grade_salary * Config.OffDutyPaycheckMultiplier) if xPlayer.paycheckEnabled then - TriggerEvent("esx:paycheckReceived", xPlayer.source, salary, job, jobLabel, onDuty) if salary > 0 then if job == "unemployed" then -- unemployed xPlayer.addAccountMoney("bank", salary, "Welfare Check") TriggerClientEvent("esx:showAdvancedNotification", player, TranslateCap("bank"), TranslateCap("received_paycheck"), TranslateCap("received_help", salary), "CHAR_BANK_MAZE", 9) if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - Unemployment Benefits", "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end - elseif Config.EnableSocietyPayouts then -- possibly a society + elseif Config.EnableSocietyPayouts then -- possibly a society TriggerEvent("esx_society:getSociety", xPlayer.job.name, function(society) - if society ~= nil then -- verified society + if society ~= nil then -- verified society TriggerEvent("esx_addonaccount:getSharedAccount", society.account, function(account) if account.money >= salary then -- does the society money to pay its employees? xPlayer.addAccountMoney("bank", salary, "Paycheck") account.removeMoney(salary) if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - " .. jobLabel, "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end @@ -45,9 +44,9 @@ function StartPayCheck() xPlayer.addAccountMoney("bank", salary, "Paycheck") if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - " .. jobLabel, "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end TriggerClientEvent("esx:showAdvancedNotification", player, TranslateCap("bank"), TranslateCap("received_paycheck"), TranslateCap("received_salary", salary), "CHAR_BANK_MAZE", 9) @@ -57,9 +56,9 @@ function StartPayCheck() xPlayer.addAccountMoney("bank", salary, "Paycheck") if Config.LogPaycheck then ESX.DiscordLogFields("Paycheck", "Paycheck - Generic", "green", { - { name = "Player", value = xPlayer.name, inline = true }, - { name = "ID", value = xPlayer.source, inline = true }, - { name = "Amount", value = salary, inline = true }, + { name = "Player", value = xPlayer.name, inline = true }, + { name = "ID", value = xPlayer.source, inline = true }, + { name = "Amount", value = salary, inline = true }, }) end TriggerClientEvent("esx:showAdvancedNotification", player, TranslateCap("bank"), TranslateCap("received_paycheck"), TranslateCap("received_salary", salary), "CHAR_BANK_MAZE", 9)