From 9f8432f73725f0298a7b7f45ec01ad021bea797e Mon Sep 17 00:00:00 2001
From: alexistb2904 <59259007+alexistb2904@users.noreply.github.com>
Date: Mon, 4 Aug 2025 09:47:55 +0000
Subject: [PATCH 01/30] Fix Discord Rich Presence integration
---
.../client/modules/adjustments.lua | 21 +++++++++++--------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/[core]/es_extended/client/modules/adjustments.lua b/[core]/es_extended/client/modules/adjustments.lua
index 4c1f1993..670f765f 100644
--- a/[core]/es_extended/client/modules/adjustments.lua
+++ b/[core]/es_extended/client/modules/adjustments.lua
@@ -170,21 +170,23 @@ local placeHolders = {
end,
}
-function Adjustments:PresencePlaceholders()
- local presence = Config.DiscordActivity.presence
-
+function Adjustments:ReplacePlaceholders(text)
for placeholder, cb in pairs(placeHolders) do
local success, result = pcall(cb)
if not success then
- error(("Failed to execute presence placeholder: ^5%s^7"):format(placeholder))
+ error(("Failed to execute placeholder: ^5%s^7"):format(placeholder))
error(result)
- return "Unknown"
+ result = "Unknown"
end
- presence = presence:gsub(("{%s}"):format(placeholder), result)
+ text = text:gsub(("{%s}"):format(placeholder), tostring(result))
end
+ return text
+end
+function Adjustments:PresencePlaceholders()
+ local presence = self:ReplacePlaceholders(Config.DiscordActivity.presence)
return presence
end
@@ -193,15 +195,16 @@ function Adjustments:DiscordPresence()
CreateThread(function()
while true do
SetDiscordAppId(Config.DiscordActivity.appId)
+ SetRichPresence(self:PresencePlaceholders())
SetDiscordRichPresenceAsset(Config.DiscordActivity.assetName)
- SetDiscordRichPresenceAssetText(Config.DiscordActivity.assetText)
+ SetDiscordRichPresenceAssetText(self:ReplacePlaceholders(Config.DiscordActivity.assetText))
for i = 1, #Config.DiscordActivity.buttons do
local button = Config.DiscordActivity.buttons[i]
- SetDiscordRichPresenceAction(i - 1, button.label, button.url)
+ local buttonUrl = self:ReplacePlaceholders(button.url)
+ SetDiscordRichPresenceAction(i - 1, button.label, buttonUrl)
end
- SetRichPresence(self:PresencePlaceholders())
Wait(Config.DiscordActivity.refresh)
end
end)
From 797fa0d90e7cf0aaec97a1ba5fceb573bb2b032b Mon Sep 17 00:00:00 2001
From: alexistb2904 <59259007+alexistb2904@users.noreply.github.com>
Date: Tue, 5 Aug 2025 21:52:37 +0000
Subject: [PATCH 02/30] 2 error into 1
---
[core]/es_extended/client/modules/adjustments.lua | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/[core]/es_extended/client/modules/adjustments.lua b/[core]/es_extended/client/modules/adjustments.lua
index 670f765f..13de1426 100644
--- a/[core]/es_extended/client/modules/adjustments.lua
+++ b/[core]/es_extended/client/modules/adjustments.lua
@@ -175,8 +175,7 @@ function Adjustments:ReplacePlaceholders(text)
local success, result = pcall(cb)
if not success then
- error(("Failed to execute placeholder: ^5%s^7"):format(placeholder))
- error(result)
+ error(("Failed to execute placeholder: ^5%s^7\n%s"):format(placeholder, result))
result = "Unknown"
end
From 0a84ce29d84587e19c2c221749a9130222ebf4dc Mon Sep 17 00:00:00 2001
From: DingYUU <64310374+DyroS3@users.noreply.github.com>
Date: Thu, 7 Aug 2025 13:11:47 +0800
Subject: [PATCH 03/30] Fix `onPlayerDropped` to pass in `cb`
When third-party scripts use
```lua
debugPrint('[LOGOUT] Awaiting Player to be unloaded [/]')
TriggerEvent('esx:playerLogout', source, function()
cb()
debugPrint('[LOGOUT] Player unloaded.')
end)
```
the issue of not passing in functions
---
[core]/es_extended/server/main.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua
index 417a016b..50fc369b 100644
--- a/[core]/es_extended/server/main.lua
+++ b/[core]/es_extended/server/main.lua
@@ -391,7 +391,7 @@ AddEventHandler("esx:setJob", function(_, job, lastJob)
end)
AddEventHandler("esx:playerLogout", function(playerId, cb)
- onPlayerDropped(playerId, "esx_player_logout")
+ onPlayerDropped(playerId, "esx_player_logout", cb)
TriggerClientEvent("esx:onPlayerLogout", playerId)
end)
From 003cd0202afeefc20d01f6c430e43477ab13c26f Mon Sep 17 00:00:00 2001
From: alexistb2904 <59259007+alexistb2904@users.noreply.github.com>
Date: Fri, 8 Aug 2025 09:49:15 +0000
Subject: [PATCH 04/30] Remove PresencePlaceholders and replace it by
ReplacePlaceholders
---
[core]/es_extended/client/modules/adjustments.lua | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/[core]/es_extended/client/modules/adjustments.lua b/[core]/es_extended/client/modules/adjustments.lua
index 13de1426..1c83b148 100644
--- a/[core]/es_extended/client/modules/adjustments.lua
+++ b/[core]/es_extended/client/modules/adjustments.lua
@@ -184,17 +184,12 @@ function Adjustments:ReplacePlaceholders(text)
return text
end
-function Adjustments:PresencePlaceholders()
- local presence = self:ReplacePlaceholders(Config.DiscordActivity.presence)
- return presence
-end
-
function Adjustments:DiscordPresence()
if Config.DiscordActivity.appId ~= 0 then
CreateThread(function()
while true do
SetDiscordAppId(Config.DiscordActivity.appId)
- SetRichPresence(self:PresencePlaceholders())
+ SetRichPresence(self:ReplacePlaceholders(Config.DiscordActivity.presence))
SetDiscordRichPresenceAsset(Config.DiscordActivity.assetName)
SetDiscordRichPresenceAssetText(self:ReplacePlaceholders(Config.DiscordActivity.assetText))
From c772d7dba8e97db169a1a2656deac5f4605139cb Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Tue, 12 Aug 2025 19:32:38 +0200
Subject: [PATCH 05/30] refactor: esx inv into menu_default & separate resource
---
[core]/es_extended/client/functions.lua | 265 +------------------
[core]/es_extended/client/modules/events.lua | 8 -
[core]/es_extended/locales/cs.lua | 41 ---
[core]/es_extended/locales/de.lua | 41 ---
[core]/es_extended/locales/el.lua | 41 ---
[core]/es_extended/locales/en.lua | 41 ---
[core]/es_extended/locales/es.lua | 41 ---
[core]/es_extended/locales/fi.lua | 41 ---
[core]/es_extended/locales/fr.lua | 41 ---
[core]/es_extended/locales/he.lua | 40 ---
[core]/es_extended/locales/hu.lua | 41 ---
[core]/es_extended/locales/id.lua | 41 ---
[core]/es_extended/locales/it.lua | 41 ---
[core]/es_extended/locales/nl.lua | 41 ---
[core]/es_extended/locales/pl.lua | 41 ---
[core]/es_extended/locales/sl.lua | 41 ---
[core]/es_extended/locales/sr.lua | 41 ---
[core]/es_extended/locales/sv.lua | 41 ---
[core]/es_extended/locales/tr.lua | 41 ---
[core]/es_extended/locales/zh-cn.lua | 41 ---
[core]/esx_inventory/client/main.lua | 223 ++++++++++++++++
[core]/esx_inventory/config/main.lua | 3 +
[core]/esx_inventory/fxmanifest.lua | 24 ++
[core]/esx_inventory/locales/cs.lua | 40 +++
[core]/esx_inventory/locales/de.lua | 40 +++
[core]/esx_inventory/locales/el.lua | 40 +++
[core]/esx_inventory/locales/en.lua | 40 +++
[core]/esx_inventory/locales/es.lua | 40 +++
[core]/esx_inventory/locales/fi.lua | 40 +++
[core]/esx_inventory/locales/fr.lua | 40 +++
[core]/esx_inventory/locales/he.lua | 40 +++
[core]/esx_inventory/locales/hu.lua | 40 +++
[core]/esx_inventory/locales/id.lua | 40 +++
[core]/esx_inventory/locales/it.lua | 40 +++
[core]/esx_inventory/locales/nl.lua | 40 +++
[core]/esx_inventory/locales/pl.lua | 40 +++
[core]/esx_inventory/locales/sl.lua | 40 +++
[core]/esx_inventory/locales/sr.lua | 40 +++
[core]/esx_inventory/locales/sv.lua | 40 +++
[core]/esx_inventory/locales/tr.lua | 40 +++
[core]/esx_inventory/locales/zh-cn.lua | 40 +++
41 files changed, 971 insertions(+), 1009 deletions(-)
create mode 100644 [core]/esx_inventory/client/main.lua
create mode 100644 [core]/esx_inventory/config/main.lua
create mode 100644 [core]/esx_inventory/fxmanifest.lua
create mode 100644 [core]/esx_inventory/locales/cs.lua
create mode 100644 [core]/esx_inventory/locales/de.lua
create mode 100644 [core]/esx_inventory/locales/el.lua
create mode 100644 [core]/esx_inventory/locales/en.lua
create mode 100644 [core]/esx_inventory/locales/es.lua
create mode 100644 [core]/esx_inventory/locales/fi.lua
create mode 100644 [core]/esx_inventory/locales/fr.lua
create mode 100644 [core]/esx_inventory/locales/he.lua
create mode 100644 [core]/esx_inventory/locales/hu.lua
create mode 100644 [core]/esx_inventory/locales/id.lua
create mode 100644 [core]/esx_inventory/locales/it.lua
create mode 100644 [core]/esx_inventory/locales/nl.lua
create mode 100644 [core]/esx_inventory/locales/pl.lua
create mode 100644 [core]/esx_inventory/locales/sl.lua
create mode 100644 [core]/esx_inventory/locales/sr.lua
create mode 100644 [core]/esx_inventory/locales/sv.lua
create mode 100644 [core]/esx_inventory/locales/tr.lua
create mode 100644 [core]/esx_inventory/locales/zh-cn.lua
diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua
index 32f8f5d9..6d507e63 100644
--- a/[core]/es_extended/client/functions.lua
+++ b/[core]/es_extended/client/functions.lua
@@ -1270,275 +1270,12 @@ function ESX.GetAccount(account)
return nil
end
----@return nil
function ESX.ShowInventory()
if not Config.EnableDefaultInventory then
return
end
- local playerPed = ESX.PlayerData.ped
- local elements = {
- { unselectable = true, icon = "fas fa-box" },
- }
- local currentWeight = 0
-
- for i = 1, #ESX.PlayerData.accounts do
- if ESX.PlayerData.accounts[i].money > 0 then
- local formattedMoney = TranslateCap("locale_currency", ESX.Math.GroupDigits(ESX.PlayerData.accounts[i].money))
- local canDrop = ESX.PlayerData.accounts[i].name ~= "bank"
-
- elements[#elements + 1] = {
- icon = "fas fa-money-bill-wave",
- title = ('%s: %s'):format(ESX.PlayerData.accounts[i].label, formattedMoney),
- count = ESX.PlayerData.accounts[i].money,
- type = "item_account",
- value = ESX.PlayerData.accounts[i].name,
- usable = false,
- rare = false,
- canRemove = canDrop,
- }
- end
- end
-
- for i = 1, #ESX.PlayerData.inventory do
- local v = ESX.PlayerData.inventory[i]
- if v.count > 0 then
- currentWeight = currentWeight + (v.weight * v.count)
-
- elements[#elements + 1] = {
- icon = "fas fa-box",
- title = ("%s x%s"):format(v.label, v.count),
- count = v.count,
- type = "item_standard",
- value = v.name,
- usable = v.usable,
- rare = v.rare,
- canRemove = v.canRemove,
- }
- end
- end
-
- elements[1].title = TranslateCap("inventory", currentWeight, Config.MaxWeight)
-
- for i = 1, #Config.Weapons do
- local v = Config.Weapons[i]
- local weaponHash = joaat(v.name)
-
- if HasPedGotWeapon(playerPed, weaponHash, false) then
- local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
-
- elements[#elements + 1] = {
- icon = "fas fa-gun",
- title = v.ammo and ("%s - %s %s"):format(v.label, ammo, v.ammo.label) or v.label,
- count = 1,
- type = "item_weapon",
- value = v.name,
- usable = false,
- rare = false,
- ammo = ammo,
- canGiveAmmo = (v.ammo ~= nil),
- canRemove = true,
- }
- end
- end
-
- ESX.CloseContext()
-
- ESX.OpenContext("right", elements, function(_, element)
- local player, distance = ESX.Game.GetClosestPlayer()
-
- local elements2 = {}
-
- if element.usable then
- elements2[#elements2 + 1] = {
- icon = "fas fa-utensils",
- title = TranslateCap("use"),
- action = "use",
- type = element.type,
- value = element.value,
- }
- end
-
- if element.canRemove then
- if player ~= -1 and distance <= 3.0 then
- elements2[#elements2 + 1] = {
- icon = "fas fa-hands",
- title = TranslateCap("give"),
- action = "give",
- type = element.type,
- value = element.value,
- }
- end
-
- elements2[#elements2 + 1] = {
- icon = "fas fa-trash",
- title = TranslateCap("remove"),
- action = "remove",
- type = element.type,
- value = element.value,
- }
- end
-
- if element.type == "item_weapon" and element.canGiveAmmo and element.ammo > 0 and player ~= -1 and distance <= 3.0 then
- elements2[#elements2 + 1] = {
- icon = "fas fa-gun",
- title = TranslateCap("giveammo"),
- action = "give_ammo",
- type = element.type,
- value = element.value,
- }
- end
-
- elements2[#elements2 + 1] = {
- icon = "fas fa-arrow-left",
- title = TranslateCap("return"),
- action = "return",
- }
-
- ESX.OpenContext("right", elements2, function(_, element2)
- local item, itemType = element2.value, element2.type
-
- if element2.action == "give" then
- local playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
-
- if #playersNearby > 0 then
- local players = {}
- local elements3 = {
- { unselectable = true, icon = "fas fa-users", title = "Nearby Players" },
- }
-
- for currentNearbyPlayerIndex = 1, #playersNearby do
- players[GetPlayerServerId(playersNearby[currentNearbyPlayerIndex])] = true
- end
-
- ESX.TriggerServerCallback("esx:getPlayerNames", function(returnedPlayers)
- for playerId, playerName in pairs(returnedPlayers) do
- elements3[#elements3 + 1] = {
- icon = "fas fa-user",
- title = playerName,
- playerId = playerId,
- }
- end
-
- ESX.OpenContext("right", elements3, function(_, element3)
- local selectedPlayer, selectedPlayerId = GetPlayerFromServerId(element3.playerId), element3.playerId
- playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
- playersNearby = ESX.Table.Set(playersNearby)
-
- if playersNearby[selectedPlayer] then
- local selectedPlayerPed = GetPlayerPed(selectedPlayer)
-
- if IsPedOnFoot(selectedPlayerPed) and not IsPedFalling(selectedPlayerPed) then
- if itemType == "item_weapon" then
- TriggerServerEvent("esx:giveInventoryItem", selectedPlayerId, itemType, item, nil)
- ESX.CloseContext()
- else
- local elementsG = {
- { unselectable = true, icon = "fas fa-trash", title = element.title },
- { icon = "fas fa-tally", title = "Amount.", input = true, inputType = "number", inputPlaceholder = "Amount to give..", inputMin = 1, inputMax = 1000 },
- { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
- }
-
- ESX.OpenContext("right", elementsG, function(menuG, _)
- local quantity = tonumber(menuG.eles[2].inputValue)
-
- if quantity and quantity > 0 and element.count >= quantity then
- TriggerServerEvent("esx:giveInventoryItem", selectedPlayerId, itemType, item, quantity)
- ESX.CloseContext()
- else
- ESX.ShowNotification(TranslateCap("amount_invalid"))
- end
- end)
- end
- else
- ESX.ShowNotification(TranslateCap("in_vehicle"))
- end
- else
- ESX.ShowNotification(TranslateCap("players_nearby"))
- ESX.CloseContext()
- end
- end)
- end, players)
- end
- elseif element2.action == "remove" then
- if IsPedOnFoot(playerPed) and not IsPedFalling(playerPed) then
- local dict, anim = "weapons@first_person@aim_rng@generic@projectile@sticky_bomb@", "plant_floor"
- ESX.Streaming.RequestAnimDict(dict)
-
- if itemType == "item_weapon" then
- ESX.CloseContext()
- TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
- RemoveAnimDict(dict)
- Wait(1000)
- TriggerServerEvent("esx:removeInventoryItem", itemType, item)
- else
- local elementsR = {
- { unselectable = true, icon = "fas fa-trash", title = element.title },
- { icon = "fas fa-tally", title = "Amount.", input = true, inputType = "number", inputPlaceholder = "Amount to remove..", inputMin = 1, inputMax = 1000 },
- { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
- }
-
- ESX.OpenContext("right", elementsR, function(menuR, _)
- local quantity = tonumber(menuR.eles[2].inputValue)
-
- if quantity and quantity > 0 and element.count >= quantity then
- ESX.CloseContext()
- TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
- RemoveAnimDict(dict)
- Wait(1000)
- TriggerServerEvent("esx:removeInventoryItem", itemType, item, quantity)
- else
- ESX.ShowNotification(TranslateCap("amount_invalid"))
- end
- end)
- end
- end
- elseif element2.action == "use" then
- ESX.CloseContext()
- TriggerServerEvent("esx:useItem", item)
- elseif element2.action == "return" then
- ESX.CloseContext()
- ESX.ShowInventory()
- elseif element2.action == "give_ammo" then
- local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
- local closestPed = GetPlayerPed(closestPlayer)
- local pedAmmo = GetAmmoInPedWeapon(playerPed, joaat(item))
-
- if IsPedOnFoot(closestPed) and not IsPedFalling(closestPed) then
- if closestPlayer ~= -1 and closestDistance < 3.0 then
- if pedAmmo > 0 then
- local elementsGA = {
- { unselectable = true, icon = "fas fa-trash", title = element.title },
- { icon = "fas fa-tally", title = "Amount.", input = true, inputType = "number", inputPlaceholder = "Amount to give..", inputMin = 1, inputMax = 1000 },
- { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
- }
-
- ESX.OpenContext("right", elementsGA, function(menuGA, _)
- local quantity = tonumber(menuGA.eles[2].inputValue)
-
- if quantity and quantity > 0 then
- if pedAmmo >= quantity then
- TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), "item_ammo", item, quantity)
- ESX.CloseContext()
- else
- ESX.ShowNotification(TranslateCap("noammo"))
- end
- else
- ESX.ShowNotification(TranslateCap("amount_invalid"))
- end
- end)
- else
- ESX.ShowNotification(TranslateCap("noammo"))
- end
- else
- ESX.ShowNotification(TranslateCap("players_nearby"))
- end
- else
- ESX.ShowNotification(TranslateCap("in_vehicle"))
- end
- end
- end)
- end)
+ exports.esx_inventory:ShowInventory()
end
RegisterNetEvent('esx:showNotification', ESX.ShowNotification)
diff --git a/[core]/es_extended/client/modules/events.lua b/[core]/es_extended/client/modules/events.lua
index 764a897a..12557b0e 100644
--- a/[core]/es_extended/client/modules/events.lua
+++ b/[core]/es_extended/client/modules/events.lua
@@ -348,14 +348,6 @@ function StartServerSyncLoops()
end)
end
-if not Config.CustomInventory and Config.EnableDefaultInventory then
- ESX.RegisterInput("showinv", TranslateCap("keymap_showinventory"), "keyboard", "F2", function()
- if not ESX.PlayerData.dead then
- ESX.ShowInventory()
- end
- end)
-end
-
if not Config.CustomInventory then
CreateThread(function()
while true do
diff --git a/[core]/es_extended/locales/cs.lua b/[core]/es_extended/locales/cs.lua
index 435cd875..ca567e92 100644
--- a/[core]/es_extended/locales/cs.lua
+++ b/[core]/es_extended/locales/cs.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventář ( Váha %s / %s )",
- ["use"] = "Použít",
- ["give"] = "Darovat",
- ["remove"] = "Odhodit",
- ["return"] = "Vrátit",
- ["give_to"] = "Darováno",
- ["amount"] = "Počet",
- ["giveammo"] = "Podat náboje",
- ["amountammo"] = "Počet nábojů",
- ["noammo"] = "Nedostatek!",
- ["gave_item"] = "Daroval %sx %s pro %s",
- ["received_item"] = "Získáno %sx %s od %s",
- ["gave_weapon"] = "Předání %s pro %s",
- ["gave_weapon_ammo"] = "Darování ~o~%sx %s do %s pro %s",
- ["gave_weapon_withammo"] = "Darování %s s ~o~%sx %s pro %s",
- ["gave_weapon_hasalready"] = "%s již vlastní %s",
- ["gave_weapon_noweapon"] = "%s nemá tuto zbraň",
- ["received_weapon"] = "Obdrženo %s od %s",
- ["received_weapon_ammo"] = "Obdrženo ~o~%sx %s pro zbraň %s od %s",
- ["received_weapon_withammo"] = "Obdrženo %s s ~o~%sx %s od %s",
- ["received_weapon_hasalready"] = "%s se snažil darovat %s, ale již tuto zbraň máš",
- ["received_weapon_noweapon"] = "%s se snažil ti dát náboje %s, ale nemáš potřebnou zbrań",
- ["gave_account_money"] = "Darováno $%s (%s) pro %s",
- ["received_account_money"] = "Získáno $%s (%s) od %s",
- ["amount_invalid"] = "Špatné množství",
- ["players_nearby"] = "Žádný hráč není poblíž",
- ["ex_inv_lim"] = "Nelze sebrat,protože máš plné kapsy %s",
- ["imp_invalid_quantity"] = "Neplatné množství",
- ["imp_invalid_amount"] = "Nelze provést, neplatné množství",
- ["threw_standard"] = "Zahozeno %sx %s",
- ["threw_account"] = "Zahozeno $%s %s",
- ["threw_weapon"] = "Zahozeno %s",
- ["threw_weapon_ammo"] = "Zahozeno %s s ~o~%sx %s",
- ["threw_weapon_already"] = "Již vlastníš tuto zbraň",
- ["threw_cannot_pickup"] = "Kapsy máš plné, nemůžeš sebrat!",
- ["threw_pickup_prompt"] = "Zmáčkni E pro sebrání!",
-
- -- Key mapping
- ["keymap_showinventory"] = "Otevřít inventář",
-
-- Salary related
["received_salary"] = "Obdržel jsi: $%s",
["received_help"] = "Obdržel jsi svůj podíl: $%s",
diff --git a/[core]/es_extended/locales/de.lua b/[core]/es_extended/locales/de.lua
index 3aac3dd2..185d5f85 100644
--- a/[core]/es_extended/locales/de.lua
+++ b/[core]/es_extended/locales/de.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventar ( Gewicht %s / %s )",
- ["use"] = "Benutzen",
- ["give"] = "Geben",
- ["remove"] = "Entsorgen",
- ["return"] = "Zurück",
- ["give_to"] = "Geben an",
- ["amount"] = "Anzahl",
- ["giveammo"] = "Munition geben",
- ["amountammo"] = "Munitions Anzahl",
- ["noammo"] = "Nicht Genug!",
- ["gave_item"] = "Du gibst %sx %s an %s",
- ["received_item"] = "Du bekommst %sx %s von %s",
- ["gave_weapon"] = "Du gibst %s an %s",
- ["gave_weapon_ammo"] = "Du gibst ~o~%sx %s für %s an %s",
- ["gave_weapon_withammo"] = "Du gibst %s mit ~o~%sx %s an %s",
- ["gave_weapon_hasalready"] = "%s hat bereits %s",
- ["gave_weapon_noweapon"] = "%s hat diese Waffe nicht",
- ["received_weapon"] = "Du bekommst %s von %s",
- ["received_weapon_ammo"] = "Du bekommst ~o~%sx %s für deine %s von %s",
- ["received_weapon_withammo"] = "Du bekommst %s mit ~o~%sx %s von %s",
- ["received_weapon_hasalready"] = "%s hat versucht dir eine %s zu geben, jedoch hast du diese Waffe bereits!",
- ["received_weapon_noweapon"] = "%s hat versucht dir Munition für eine %s zu geben, jedoch hast du diese Waffe nicht!",
- ["gave_account_money"] = "Du gibst %s€ (%s) an %s",
- ["received_account_money"] = "Du bekommst %s€ (%s) von %s",
- ["amount_invalid"] = "Ungültige Anzahl",
- ["players_nearby"] = "Keine Personen in der Nähe!",
- ["ex_inv_lim"] = "Du kannst diese Aktion nicht ausführen!, Inventarlimit für %s überschritten.",
- ["imp_invalid_quantity"] = "Du kannst diese Aktion nicht ausführen!, Ungültige Anzahl!",
- ["imp_invalid_amount"] = "Du kannst diese Aktion nicht ausführen!, Ungültige Anzahl",
- ["threw_standard"] = "Du entsorgst %sx %s",
- ["threw_account"] = "Du Entsorgst %s€ %s",
- ["threw_weapon"] = "Du entsorgst %s",
- ["threw_weapon_ammo"] = "Du entsorgst %s mit ~o~%sx %s",
- ["threw_weapon_already"] = "Du hast diese Waffe bereits!",
- ["threw_cannot_pickup"] = "Inventar ist voll! Du kannst dies nicht aufheben",
- ["threw_pickup_prompt"] = "Drücke [E] zum aufheben",
-
- -- Key mapping
- ["keymap_showinventory"] = "Inventar Anzeigen",
-
-- Salary related
["received_salary"] = "Dein Gehaltscheck ist angekommen!: %s€",
["received_help"] = "Deine Sozialhilfe ist angekommen: %s€",
diff --git a/[core]/es_extended/locales/el.lua b/[core]/es_extended/locales/el.lua
index 4fe64ddc..c24310e2 100644
--- a/[core]/es_extended/locales/el.lua
+++ b/[core]/es_extended/locales/el.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Αποθήκη ( Βάρος %s / %s )",
- ["use"] = "Χρήση",
- ["give"] = "Δώσε",
- ["remove"] = "Πέτα",
- ["return"] = "Επιστροφή",
- ["give_to"] = "Δώσε σε",
- ["amount"] = "Ποσότητα",
- ["giveammo"] = "Δώσε σφαίρες",
- ["amountammo"] = "Ποσότητα σφαιρών",
- ["noammo"] = "Δεν υπάρχουν αρκετές σφαίρες!",
- ["gave_item"] = "Δώσατε %sx %s στον/στην %s",
- ["received_item"] = "Λάβατε %sx %s από τον/την %s",
- ["gave_weapon"] = "Δίνετε %s στον/στην %s",
- ["gave_weapon_ammo"] = "Δίνετε ~o~%sx %s για %s στον/στην %s",
- ["gave_weapon_withammo"] = "Δίνετε %s με ~o~%sx %s στον/στην %s",
- ["gave_weapon_hasalready"] = "Ο/Η %s έχει ήδη ένα %s",
- ["gave_weapon_noweapon"] = "Ο/Η %s δεν έχει αυτό το όπλο",
- ["received_weapon"] = "Λάβατε %s από τον/την %s",
- ["received_weapon_ammo"] = "Λάβατε ~o~%sx %s για το %s από τον/την %s",
- ["received_weapon_withammo"] = "Λάβατε %s για ~o~%sx %s από τον/την %s",
- ["received_weapon_hasalready"] = "Ο/Η %s προσπάθησε να σας δώσει ένα %s, αλλά το έχετε ήδη",
- ["received_weapon_noweapon"] = "Ο/Η %s προσπάθησε να σας δώσει σφαίρες για το %s, αλλά δεν έχετε αυτό το όπλο",
- ["gave_account_money"] = "Δίνετε $%s (%s) στον/στην %s",
- ["received_account_money"] = "Λάβατε $%s (%s) από τον/την %s",
- ["amount_invalid"] = "Μη έγκυρη ποσότητα",
- ["players_nearby"] = "Δεν υπάρχουν κοντινοί παίκτες",
- ["ex_inv_lim"] = "Δεν είναι δυνατή η ενέργεια, υπέρβαση του μέγιστου βάρους των %s",
- ["imp_invalid_quantity"] = "Δεν είναι δυνατή η ενέργεια, η ποσότητα δεν είναι έγκυρη",
- ["imp_invalid_amount"] = "Δεν είναι δυνατή η ενέργεια, το ποσό δεν είναι έγκυρο",
- ["threw_standard"] = "Ρίχνοντας %sx %s",
- ["threw_account"] = "Ρίχνοντας $%s %s",
- ["threw_weapon"] = "Ρίχνοντας %s",
- ["threw_weapon_ammo"] = "Ρίχνοντας %s με ~o~%sx %s",
- ["threw_weapon_already"] = "Ήδη έχετε αυτό το όπλο",
- ["threw_cannot_pickup"] = "Η αποθήκη είναι γεμάτη, δεν μπορείτε να σηκώσετε!",
- ["threw_pickup_prompt"] = "Πατήστε E για να σηκώσετε",
-
- -- Key mapping
- ["keymap_showinventory"] = "Εμφάνιση Αποθήκης",
-
-- Salary related
["received_salary"] = "Έχετε λάβει μισθό: $%s",
["received_help"] = "Έχετε λάβει το βοήθημά σας: $%s",
diff --git a/[core]/es_extended/locales/en.lua b/[core]/es_extended/locales/en.lua
index b10966a9..4492a4ea 100644
--- a/[core]/es_extended/locales/en.lua
+++ b/[core]/es_extended/locales/en.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventory ( Weight %s / %s )",
- ["use"] = "Use",
- ["give"] = "Give",
- ["remove"] = "Throw",
- ["return"] = "Return",
- ["give_to"] = "Give to",
- ["amount"] = "Amount",
- ["giveammo"] = "Give ammo",
- ["amountammo"] = "Ammo Amount",
- ["noammo"] = "Not Enough!",
- ["gave_item"] = "Giving %sx %s to %s",
- ["received_item"] = "Received %sx %s from %s",
- ["gave_weapon"] = "Giving %s to %s",
- ["gave_weapon_ammo"] = "Giving ~o~%sx %s for %s to %s",
- ["gave_weapon_withammo"] = "Giving %s with ~o~%sx %s to %s",
- ["gave_weapon_hasalready"] = "%s already has a %s",
- ["gave_weapon_noweapon"] = "%s does not have that weapon",
- ["received_weapon"] = "Received %s from %s",
- ["received_weapon_ammo"] = "Received ~o~%sx %s for your %s from %s",
- ["received_weapon_withammo"] = "Received %s with ~o~%sx %s from %s",
- ["received_weapon_hasalready"] = "%s has attempted to give you a %s, but you already this weapon",
- ["received_weapon_noweapon"] = "%s has attempted to give you ammo for a %s, but you do not have this weapon",
- ["gave_account_money"] = "Giving $%s (%s) to %s",
- ["received_account_money"] = "Received $%s (%s) from %s",
- ["amount_invalid"] = "Invalid quantity",
- ["players_nearby"] = "No nearby Players",
- ["ex_inv_lim"] = "Cannot perfom action,exceeding max weight of %s",
- ["imp_invalid_quantity"] = "Cannot perfom action, the quantity is invalid",
- ["imp_invalid_amount"] = "Cannot perfom action, the amount is invalid",
- ["threw_standard"] = "Throwing %sx %s",
- ["threw_account"] = "Throwing $%s %s",
- ["threw_weapon"] = "Throwing %s",
- ["threw_weapon_ammo"] = "Throwing %s with ~o~%sx %s",
- ["threw_weapon_already"] = "You already have this weapon",
- ["threw_cannot_pickup"] = "Inventory is full, Cannot Pickup!",
- ["threw_pickup_prompt"] = "Press E to Pickup",
-
- -- Key mapping
- ["keymap_showinventory"] = "Show Inventory",
-
-- Salary related
["received_salary"] = "You have been paid: $%s",
["received_help"] = "You have been paid your welfare check: $%s",
diff --git a/[core]/es_extended/locales/es.lua b/[core]/es_extended/locales/es.lua
index 47e3b99e..c61b1a34 100644
--- a/[core]/es_extended/locales/es.lua
+++ b/[core]/es_extended/locales/es.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventario (Peso %s / %s)",
- ["use"] = "Usar",
- ["give"] = "Dar",
- ["remove"] = "Tirar",
- ["return"] = "Devolver",
- ["give_to"] = "Dar a",
- ["amount"] = "Cantidad",
- ["giveammo"] = "Dar munición",
- ["amountammo"] = "Cantidad de munición",
- ["noammo"] = "¡Insuficiente!",
- ["gave_item"] = "Dando %sx %s a %s",
- ["received_item"] = "Recibido %sx %s de %s",
- ["gave_weapon"] = "Dando %s a %s",
- ["gave_weapon_ammo"] = "Dando ~o~%sx %s para %s a %s",
- ["gave_weapon_withammo"] = "Dando %s con ~o~%sx %s a %s",
- ["gave_weapon_hasalready"] = "%s ya tiene un %s",
- ["gave_weapon_noweapon"] = "%s no tiene esa arma",
- ["received_weapon"] = "Recibido %s de %s",
- ["received_weapon_ammo"] = "Recibido ~o~%sx %s para tu %s de %s",
- ["received_weapon_withammo"] = "Recibido %s con ~o~%sx %s de %s",
- ["received_weapon_hasalready"] = "%s ha intentado darte un %s, pero ya tienes esta arma",
- ["received_weapon_noweapon"] = "%s ha intentado darte munición para un %s, pero no tienes esta arma",
- ["gave_account_money"] = "Dando $%s (%s) a %s",
- ["received_account_money"] = "Recibido $%s (%s) de %s",
- ["amount_invalid"] = "Cantidad inválida",
- ["players_nearby"] = "No hay jugadores cerca",
- ["ex_inv_lim"] = "No se puede realizar la acción, se excede el peso máximo de %s",
- ["imp_invalid_quantity"] = "No se puede realizar la acción, la cantidad es inválida",
- ["imp_invalid_amount"] = "No se puede realizar la acción, la cantidad es inválida",
- ["threw_standard"] = "Tirando %sx %s",
- ["threw_account"] = "Tirando $%s %s",
- ["threw_weapon"] = "Tirando %s",
- ["threw_weapon_ammo"] = "Tirando %s con ~o~%sx %s",
- ["threw_weapon_already"] = "Ya tienes esta arma",
- ["threw_cannot_pickup"] = "¡Inventario lleno, no se puede recoger!",
- ["threw_pickup_prompt"] = "Pulsa E para recoger",
-
- -- Key mapping
- ["keymap_showinventory"] = "Mostrar inventario",
-
-- Salary related
["received_salary"] = "Has cobrado: $%s",
["received_help"] = "Has cobrado tu subsidio: $%s",
diff --git a/[core]/es_extended/locales/fi.lua b/[core]/es_extended/locales/fi.lua
index a1ebffd2..ceb76da4 100644
--- a/[core]/es_extended/locales/fi.lua
+++ b/[core]/es_extended/locales/fi.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Reppu %s / %s",
- ["use"] = "Käytä",
- ["give"] = "Anna",
- ["remove"] = "Poista",
- ["return"] = "Takaisin",
- ["give_to"] = "Anna henkilölle",
- ["amount"] = "Määrä",
- ["giveammo"] = "Anna ammuksia",
- ["amountammo"] = "Ammusten määrä",
- ["noammo"] = "Sinulla ei ole ammuksia!",
- ["gave_item"] = "Sinä annoit %sx %s henkilölle %s",
- ["received_item"] = "Sinä sait %sx %s henkilöltä %s",
- ["gave_weapon"] = "Sinä annoit 1x %s henkilölle %s",
- ["gave_weapon_ammo"] = "Annoit ~o~%sx %s kohteelle %s henkilölle %s",
- ["gave_weapon_withammo"] = "Sinä annoit 1x %s ammuksella ~o~%sx %s henkilölle %s",
- ["gave_weapon_hasalready"] = "%s omistaa jo %s",
- ["gave_weapon_noweapon"] = "%s ei ole kyseistä asetta",
- ["received_weapon"] = "Vastaanotit 1x %s henkilöltä %s",
- ["received_weapon_ammo"] = "Sinä sait ~o~%sx %s sinun %s varten henkilöltä %s",
- ["received_weapon_withammo"] = "Sinä sait 1x %s ammuksella ~o~%sx %s henkilöltä %s",
- ["received_weapon_hasalready"] = "%s yritti antaa sinulle %s, mutta sinulla on jo sellainen",
- ["received_weapon_noweapon"] = "%s yritti antaa sinulle ammuksia %s:lle, mutta sinulla ei ole sellaista",
- ["gave_account_money"] = "Sinä annoit $%s (%s) henkilölle %s",
- ["received_account_money"] = "Sinä sait $%s (%s) henkilöltä %s",
- ["amount_invalid"] = "Virheellinen määrä",
- ["players_nearby"] = "Ei pelaajia lähettyvillä",
- ["ex_inv_lim"] = "Toiminto mahdoton, reppu alkaa olla täysi %s",
- ["imp_invalid_quantity"] = "Toiminto mahdoton, virheellinen määrä",
- ["imp_invalid_amount"] = "Toiminto mahdoton, virhellinen summa",
- ["threw_standard"] = "Sinä heitit %sx %s",
- ["threw_account"] = "Sinä heitit $%s %s",
- ["threw_weapon"] = "Sinä heitit 1x %s",
- ["threw_weapon_ammo"] = "Heitit 1x %s ammuksella ~o~%sx %s",
- ["threw_weapon_already"] = "Sinulla on jo sama ase",
- ["threw_cannot_pickup"] = "Et voi kerätä sitä, koska reppusi on täynnä",
- ["threw_pickup_prompt"] = "Paina E kerätäksesi",
-
- -- Key mapping
- ["keymap_showinventory"] = "Avaa reppu",
-
-- Salary related
["received_salary"] = "Vastaanotit palkkaa: $%s",
["received_help"] = "Vastaanotit valtion tukea: $%s",
diff --git a/[core]/es_extended/locales/fr.lua b/[core]/es_extended/locales/fr.lua
index 95f5f796..8870e1ee 100644
--- a/[core]/es_extended/locales/fr.lua
+++ b/[core]/es_extended/locales/fr.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventaire ( Poids %s / %s )",
- ["use"] = "Utiliser",
- ["give"] = "Donner",
- ["remove"] = "Jeter",
- ["return"] = "Retour",
- ["give_to"] = "Donner à",
- ["amount"] = "Quantité",
- ["giveammo"] = "Donner des munitions",
- ["amountammo"] = "Nombre de munitions",
- ["noammo"] = "Vous n'avez pas autant de munitions!",
- ["gave_item"] = "Vous avez donné %sx %s à %s",
- ["received_item"] = "Vous avez reçu %sx %s de %s",
- ["gave_weapon"] = "Vous avez donné 1x %s à %s",
- ["gave_weapon_ammo"] = "Vous avez donné ~o~%sx %s pour %s à %s",
- ["gave_weapon_withammo"] = "Vous avez donné 1x %s avec ~o~%sx %s à %s",
- ["gave_weapon_hasalready"] = "%s a déjà 1x %s",
- ["gave_weapon_noweapon"] = "%s n'a pas cette arme",
- ["received_weapon"] = "Vous avez reçu 1x %s de %s",
- ["received_weapon_ammo"] = "Vous avez reçu ~o~%sx %s pour votre %s de %s",
- ["received_weapon_withammo"] = "Vous avez reçu 1x %s avec ~o~%sx %s de %s",
- ["received_weapon_hasalready"] = "%s a tenté de vous donner 1x %s, mais vous en aviez déjà un exemplaire",
- ["received_weapon_noweapon"] = "%s a tenté de vous donner des munitions pour %s, mais vous n'avez pas cette arme",
- ["gave_account_money"] = "Vous avez donné $%s (%s) à %s",
- ["received_account_money"] = "Vous avez reçu $%s (%s) de %s",
- ["amount_invalid"] = "Le montant est invalide",
- ["players_nearby"] = "Aucun joueur n'est à proximité",
- ["ex_inv_lim"] = "Action impossible, dépassement du poids maximum de %s",
- ["imp_invalid_quantity"] = "Action impossible, la quantité est invalide",
- ["imp_invalid_amount"] = "Action impossible, le montant est invalide",
- ["threw_standard"] = "Vous avez jeté %sx %s",
- ["threw_account"] = "Vous avez jeté $%s %s",
- ["threw_weapon"] = "Vous avez jeté 1x %s",
- ["threw_weapon_ammo"] = "Vous avez jeté 1x %s avec ~o~%sx %s",
- ["threw_weapon_already"] = "Vous avez déjà cette arme",
- ["threw_cannot_pickup"] = "Votre inventaire est plein, vous ne pouvez donc pas ramasser cela!",
- ["threw_pickup_prompt"] = "Appuyez sur E pour ramasser",
-
- -- Key mapping
- ["keymap_showinventory"] = "Afficher l'inventaire",
-
-- Salary related
["received_salary"] = "Vous avez reçu votre salaire: $%s",
["received_help"] = "Vous avez reçu une aide de l'état: $%s",
diff --git a/[core]/es_extended/locales/he.lua b/[core]/es_extended/locales/he.lua
index 4c8440ff..b11f3d31 100644
--- a/[core]/es_extended/locales/he.lua
+++ b/[core]/es_extended/locales/he.lua
@@ -1,44 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "מלאי ( משקל %s / %s )",
- ["use"] = "השתמש",
- ["give"] = "תן",
- ["remove"] = "זרוק",
- ["return"] = "חזור",
- ["give_to"] = "תן ל",
- ["amount"] = "כמות",
- ["giveammo"] = "תן תחמושת",
- ["amountammo"] = "כמות תחמושת",
- ["noammo"] = "לא מספיק!",
- ["gave_item"] = "ניתן %sx %s ל %s",
- ["received_item"] = "קיבלת %sx %s מ %s",
- ["gave_weapon"] = "ניתן %s ל %s",
- ["gave_weapon_ammo"] = "ניתן ~o~%sx %s ל %s ל %s",
- ["gave_weapon_withammo"] = "ניתן %s עם ~o~%sx %s ל %s",
- ["gave_weapon_hasalready"] = "%s כבר יש לו %s",
- ["gave_weapon_noweapon"] = "%s אין לו את הנשק הזה",
- ["received_weapon"] = "קיבלת %s מ %s",
- ["received_weapon_ammo"] = "קיבלת ~o~%sx %s ל %s שלך מ %s",
- ["received_weapon_withammo"] = "קיבלת %s עם ~o~%sx %s מ %s",
- ["received_weapon_hasalready"] = "%s ניסה לתת לך %s, אך יש לך כבר נשק זה",
- ["received_weapon_noweapon"] = "%s ניסה לתת לך תחמושת ל %s, אך אין לך נשק זה",
- ["gave_account_money"] = "ניתן $%s (%s) ל %s",
- ["received_account_money"] = "קיבלת $%s (%s) מ %s",
- ["amount_invalid"] = "כמות לא חוקית",
- ["players_nearby"] = "אין שחקנים קרובים",
- ["ex_inv_lim"] = "לא ניתן לבצע פעולה, חורג מהמשקל המרבי של %s",
- ["imp_invalid_quantity"] = "לא ניתן לבצע פעולה, הכמות אינה חוקית",
- ["imp_invalid_amount"] = "לא ניתן לבצע פעולה, הסכום אינו חוקי",
- ["threw_standard"] = "זורק %sx %s",
- ["threw_account"] = "זורק $%s %s",
- ["threw_weapon"] = "זורק %s",
- ["threw_weapon_ammo"] = "זורק %s עם ~o~%sx %s",
- ["threw_weapon_already"] = "כבר יש לך נשק זה",
- ["threw_cannot_pickup"] = "המלאי מלא, לא ניתן לאסוף!",
- ["threw_pickup_prompt"] = "לחץ E כדי לאסוף",
- -- Key mapping
- ["keymap_showinventory"] = "הצג מלאי",
-
-- Salary related
["received_salary"] = "קיבלת שכר: $%s",
["received_help"] = "קיבלת הטבה: $%s",
diff --git a/[core]/es_extended/locales/hu.lua b/[core]/es_extended/locales/hu.lua
index e805ccf1..b0e05f76 100644
--- a/[core]/es_extended/locales/hu.lua
+++ b/[core]/es_extended/locales/hu.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventory ( Súly %s / %s )",
- ["use"] = "Használ",
- ["give"] = "Átad",
- ["remove"] = "Eldob",
- ["return"] = "Visszatérés",
- ["give_to"] = "Adni valakinek",
- ["amount"] = "Mennyiség",
- ["giveammo"] = "Lőszer adás",
- ["amountammo"] = "Lőszer mennyiség",
- ["noammo"] = "Nincsen több lövedéked!",
- ["gave_item"] = "Átadtál: %sx %s neki: %s",
- ["received_item"] = "Kaptál: %sx %s töle: %s",
- ["gave_weapon"] = "Átadtál: %s neki: %s",
- ["gave_weapon_ammo"] = "Átadtál ~o~%sx %s %s neki: %s",
- ["gave_weapon_withammo"] = "Átadtál %s ~o~%sx %s neki: %s",
- ["gave_weapon_hasalready"] = "%s már rendelkezik %s",
- ["gave_weapon_noweapon"] = "%s nincsen ilyen fegyere",
- ["received_weapon"] = "Kaptál: %s töle: %s",
- ["received_weapon_ammo"] = "Kaptál ~o~%sx %s %s töle: %s",
- ["received_weapon_withammo"] = "Kaptál %s ~o~%sx %s töle: %s",
- ["received_weapon_hasalready"] = "%s megpróbálta átadni a következöt: %s, nem már van rendelkezel egy ilyennel",
- ["received_weapon_noweapon"] = "%s átakart adni %s, de nincsen ilyen fegyvered",
- ["gave_account_money"] = "Átadtál: $%s (%s) neki: %s",
- ["received_account_money"] = "Kaptál: $%s (%s) töle: %s",
- ["amount_invalid"] = "Érvénytelen mennyiség",
- ["players_nearby"] = "Nincsen játékos a közeledben",
- ["ex_inv_lim"] = "Nincsen elég szabad helyed %s",
- ["imp_invalid_quantity"] = "Érvénytelen mennyiség",
- ["imp_invalid_amount"] = "Érvénytelen összeg",
- ["threw_standard"] = "Kidobtál: %sx %s",
- ["threw_account"] = "Kidobtál: $%s %s",
- ["threw_weapon"] = "Kidobtál: %s",
- ["threw_weapon_ammo"] = "Kidobtál: %s ~o~%sx %s",
- ["threw_weapon_already"] = "Van már ilyen fegyvered",
- ["threw_cannot_pickup"] = "Nincsen elég szabad helyed",
- ["threw_pickup_prompt"] = "E hogy felvedd",
-
- -- Key mapping
- ["keymap_showinventory"] = "Leltár mutatása",
-
-- Salary related
["received_salary"] = "Megkaptad a fizetésed: $%s",
["received_help"] = "Megkaptad a segélyt: $%s",
diff --git a/[core]/es_extended/locales/id.lua b/[core]/es_extended/locales/id.lua
index 1dfa8487..f64361d2 100644
--- a/[core]/es_extended/locales/id.lua
+++ b/[core]/es_extended/locales/id.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventaris ( Berat %s / %s )",
- ["use"] = "Gunakan",
- ["give"] = "Beri",
- ["remove"] = "Buang",
- ["return"] = "Kembali",
- ["give_to"] = "Beri ke",
- ["amount"] = "Jumlah",
- ["giveammo"] = "Beri amunisi",
- ["amountammo"] = "Jumlah Amunisi",
- ["noammo"] = "Tidak cukup!",
- ["gave_item"] = "Memberi %sx %s ke %s",
- ["received_item"] = "Menerima %sx %s dari %s",
- ["gave_weapon"] = "Memberi %s ke %s",
- ["gave_weapon_ammo"] = "Memberi ~o~%sx %s untuk %s ke %s",
- ["gave_weapon_withammo"] = "Memberi %s dengan ~o~%sx %s ke %s",
- ["gave_weapon_hasalready"] = "%s sudah memiliki %s",
- ["gave_weapon_noweapon"] = "%s tidak memiliki senjata tersebut",
- ["received_weapon"] = "Menerima %s dari %s",
- ["received_weapon_ammo"] = "Menerima ~o~%sx %s untuk %s Anda dari %s",
- ["received_weapon_withammo"] = "Menerima %s dengan ~o~%sx %s dari %s",
- ["received_weapon_hasalready"] = "%s mencoba memberimu %s, tapi kamu sudah memiliki senjata ini",
- ["received_weapon_noweapon"] = "%s mencoba memberimu amunisi untuk %s, tapi kamu tidak memiliki senjata ini",
- ["gave_account_money"] = "Memberi $%s (%s) ke %s",
- ["received_account_money"] = "Menerima $%s (%s) dari %s",
- ["amount_invalid"] = "Jumlah salah",
- ["players_nearby"] = "Tidak ada Player di sekitar",
- ["ex_inv_lim"] = "Tidak dapat melakukan aksi, melebihi batas berat dari %s",
- ["imp_invalid_quantity"] = "Tidak dapat melakukan aksi, jumlah salah",
- ["imp_invalid_amount"] = "Tidak dapat melakukan aksi, jumlah salah",
- ["threw_standard"] = "Membuang %sx %s",
- ["threw_account"] = "Membuang $%s %s",
- ["threw_weapon"] = "Membuang %s",
- ["threw_weapon_ammo"] = "Membuang %s dengan ~o~%sx %s",
- ["threw_weapon_already"] = "Kamu sudah memiliki senjata ini",
- ["threw_cannot_pickup"] = "Inventaris penuh, Tidak dapat mengambil!",
- ["threw_pickup_prompt"] = "Tekan E untuk Mengambil",
-
- -- Key mapping
- ["keymap_showinventory"] = "Buka Inventaris",
-
-- Salary related
["received_salary"] = "Anda telah dibayar: $%s",
["received_help"] = "Anda telah menerima dana kesejahteraan: $%s",
diff --git a/[core]/es_extended/locales/it.lua b/[core]/es_extended/locales/it.lua
index 9de0edb5..80378e1c 100644
--- a/[core]/es_extended/locales/it.lua
+++ b/[core]/es_extended/locales/it.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventario ( Peso %s / %s )",
- ["use"] = "Usa",
- ["give"] = "Dai",
- ["remove"] = "Butta",
- ["return"] = "Ritorna",
- ["give_to"] = "Dai a",
- ["amount"] = "Quantità",
- ["giveammo"] = "Dai munizioni",
- ["amountammo"] = "Quantità munizioni",
- ["noammo"] = "Non abbastanza!",
- ["gave_item"] = "Dando %sx %s a %s",
- ["received_item"] = "Ricevuto %sx %s da %s",
- ["gave_weapon"] = "Dando %s a %s",
- ["gave_weapon_ammo"] = "Dando ~o~%sx %s for %s to %s",
- ["gave_weapon_withammo"] = "Dando %s con ~o~%sx %s a %s",
- ["gave_weapon_hasalready"] = "%s possiede già %s",
- ["gave_weapon_noweapon"] = "%s non ha quell' arma",
- ["received_weapon"] = "Ricevuto %s da %s",
- ["received_weapon_ammo"] = "Ricevuto ~o~%sx %s per il tuo %s da %s",
- ["received_weapon_withammo"] = "Ricevuto %s con ~o~%sx %s per %s",
- ["received_weapon_hasalready"] = "%s ha tentato di darti %s, ma hai già l'arma",
- ["received_weapon_noweapon"] = "%s ha tentato di darti munizioni per %s, ma non hai l'arma",
- ["gave_account_money"] = "Dando $%s (%s) a %s",
- ["received_account_money"] = "Ricevuto $%s (%s) da %s",
- ["amount_invalid"] = "Quantità non valida",
- ["players_nearby"] = "Nessun giocatore vicino",
- ["ex_inv_lim"] = "Non puoi farlo, eccedi il peso di %s",
- ["imp_invalid_quantity"] = "Non puoi farlo, quantità non valida",
- ["imp_invalid_amount"] = "Non puoi farlo, importo non valido",
- ["threw_standard"] = "Gettando %sx %s",
- ["threw_account"] = "Gettando $%s %s",
- ["threw_weapon"] = "Gettando %s",
- ["threw_weapon_ammo"] = "Gettando %s con ~o~%sx %s",
- ["threw_weapon_already"] = "Hai gia quest' arma",
- ["threw_cannot_pickup"] = "Inventario pieno, non puoi raccogliere!",
- ["threw_pickup_prompt"] = "Premi E per raccogliere",
-
- -- Key mapping
- ["keymap_showinventory"] = "Apri inventario",
-
-- Salary related
["received_salary"] = "Sei stato pagato: $%s",
["received_help"] = "Hai ricevuto il reddito di cittadinanza: $%s",
diff --git a/[core]/es_extended/locales/nl.lua b/[core]/es_extended/locales/nl.lua
index 494e0c3f..b03c1f9e 100644
--- a/[core]/es_extended/locales/nl.lua
+++ b/[core]/es_extended/locales/nl.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventaris ( Gewicht %s / %s )",
- ["use"] = "Gebruik",
- ["give"] = "Geef",
- ["remove"] = "Gooi",
- ["return"] = "Terug",
- ["give_to"] = "Geef aan",
- ["amount"] = "Aantal",
- ["giveammo"] = "Geef munitie",
- ["amountammo"] = "Hoeveelheid munitie",
- ["noammo"] = "Niet genoeg munitie!",
- ["gave_item"] = "%sx %s gegeven aan %s",
- ["received_item"] = "%sx %s ontvangen van %s",
- ["gave_weapon"] = "%s gegeven aan %s",
- ["gave_weapon_ammo"] = "~o~%sx %s gegeven voor een %s aan %s",
- ["gave_weapon_withammo"] = "%s gegeven met ~o~%sx %s aan %s",
- ["gave_weapon_hasalready"] = "%s heeft al een %s",
- ["gave_weapon_noweapon"] = "%s heeft dat wapen niet",
- ["received_weapon"] = "%s ontvangen van %s",
- ["received_weapon_ammo"] = "~o~%sx %s ontvangen voor je %s van %s",
- ["received_weapon_withammo"] = "%s ontvangen met ~o~%sx %s van %s",
- ["received_weapon_hasalready"] = "%s heeft geprobeerd je een %s te geven, maar je hebt dat wapen al.",
- ["received_weapon_noweapon"] = "%s heeft geprobeerd je ammo te geven voor een %s, maar je hebt dit wapen niet",
- ["gave_account_money"] = "€%s (%s) gegeven aan %s",
- ["received_account_money"] = "€%s (%s) ontvangen van %s",
- ["amount_invalid"] = "Ongeldige hoeveelheid",
- ["players_nearby"] = "Geen spelers in de buurt",
- ["ex_inv_lim"] = "Kan actie niet uitvoeren, overschrijdt max. gewicht van %s",
- ["imp_invalid_quantity"] = "Kan actie niet uitvoeren, de hoeveelheid is ongeldig",
- ["imp_invalid_amount"] = "Kan actie niet uitvoeren, het aantal is ongeldig",
- ["threw_standard"] = "%sx %s weggegooid",
- ["threw_account"] = "€%s %s weggegooid",
- ["threw_weapon"] = "%s weggegooid",
- ["threw_weapon_ammo"] = "%s met ~o~%sx %s weggegooid",
- ["threw_weapon_already"] = "Je hebt dit wapen al !",
- ["threw_cannot_pickup"] = "Inventaris is vol, je kan dit niet oppakken!",
- ["threw_pickup_prompt"] = "Druk op E om op te pakken",
-
- -- Key mapping
- ["keymap_showinventory"] = "Laat inventaris zien",
-
-- Salary related
["received_salary"] = "Je bent betaald: €%s",
["received_help"] = "Je hebt je uitkering gekregen: €%s",
diff --git a/[core]/es_extended/locales/pl.lua b/[core]/es_extended/locales/pl.lua
index 7535ffdd..aa12acd2 100644
--- a/[core]/es_extended/locales/pl.lua
+++ b/[core]/es_extended/locales/pl.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "ekwipunek %s / %s",
- ["use"] = "użyj",
- ["give"] = "daj",
- ["remove"] = "usuń",
- ["return"] = "wróć",
- ["give_to"] = "daj dla",
- ["amount"] = "ilość",
- ["giveammo"] = "daj amunicje",
- ["amountammo"] = "ilość amunicji",
- ["noammo"] = "nie posiadasz wystarczającej ilości amunicji!",
- ["gave_item"] = "dałeś/aś %sx %s dla %s",
- ["received_item"] = "otrzymałeś/aś %sx %s od %s",
- ["gave_weapon"] = "dałeś/aś %s dla %s",
- ["gave_weapon_ammo"] = "dałeś/aś ~o~%sx %s do %s dla %s",
- ["gave_weapon_withammo"] = "dałeś/aś %s z ~o~%sx %s dla %s",
- ["gave_weapon_hasalready"] = "%s już posiada %s",
- ["gave_weapon_noweapon"] = "%s nie posiada tej broni",
- ["received_weapon"] = "otrzymałeś/aś %s od %s",
- ["received_weapon_ammo"] = "otrzymałeś/aś ~o~%sx %s do twojego %s od %s",
- ["received_weapon_withammo"] = "otrzymałeś/aś %s z ~o~%sx %s od %s",
- ["received_weapon_hasalready"] = "%s próbował/a przekazać ci %s, lecz już posiadasz jedno",
- ["received_weapon_noweapon"] = "%s próbował/a przekazać ci amunicje do %s, lecz nie posiadasz tej broni",
- ["gave_account_money"] = "dałeś/aś %s$ (%s) dla %s",
- ["received_account_money"] = "otrzymałeś/aś %s$ (%s) od %s",
- ["amount_invalid"] = "nieprawidłowa ilość",
- ["players_nearby"] = "brak graczy w pobliżu",
- ["ex_inv_lim"] = "akcja nie jest możliwa, nie możesz mieć więcej %s",
- ["imp_invalid_quantity"] = "akcja jest niemożliwa, nieprawidłowa ilość",
- ["imp_invalid_amount"] = "akcja jest niemożliwa, nieprawidłowa kwota",
- ["threw_standard"] = "wyrzuciłeś/aś %sx %s",
- ["threw_account"] = "wyrzuciłeś/aś $%s %s",
- ["threw_weapon"] = "wyrzuciłeś/aś %s",
- ["threw_weapon_ammo"] = "wyrzuciłeś/aś %s z ~o~%sx %s",
- ["threw_weapon_already"] = "już posiadasz taką samą broń",
- ["threw_cannot_pickup"] = "nie możesz tego podnieść, gdyż masz pełny ekwipunek!",
- ["threw_pickup_prompt"] = "naciśnij E aby podnieść",
-
- -- Key mapping
- ["keymap_showinventory"] = "pokaż ekwipunek",
-
-- Salary related
["received_salary"] = "otrzymałeś/aś wynagrodzenie: %s$",
["received_help"] = "otrzymałeś/aś zapomogę: $%s",
diff --git a/[core]/es_extended/locales/sl.lua b/[core]/es_extended/locales/sl.lua
index 3808ab28..1d607c02 100644
--- a/[core]/es_extended/locales/sl.lua
+++ b/[core]/es_extended/locales/sl.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Shramba ( Teza %s / %s )",
- ["use"] = "Uporabi",
- ["give"] = "Daj",
- ["remove"] = "Vrzi",
- ["return"] = "Povratek",
- ["give_to"] = "Daj",
- ["amount"] = "Vsota",
- ["giveammo"] = "Daj Strelivo",
- ["amountammo"] = "Količina streliva",
- ["noammo"] = "Ni dovolj!",
- ["gave_item"] = "Dal si %sx %s k %s",
- ["received_item"] = "Dobil si %sx %s od %s",
- ["gave_weapon"] = "Dajanje %s do %s",
- ["gave_weapon_ammo"] = "Dajanje ~o~%sx %s za %s do %s",
- ["gave_weapon_withammo"] = "Dajanje %s z ~o~%sx %s do %s",
- ["gave_weapon_hasalready"] = "%s ze ima %s",
- ["gave_weapon_noweapon"] = "%s se nima tega orozja",
- ["received_weapon"] = "Dobil si %s od %s",
- ["received_weapon_ammo"] = "Dobil ~o~%sx %s za tvoj/o %s od %s",
- ["received_weapon_withammo"] = "Dobil si %s z ~o~%sx %s od %s",
- ["received_weapon_hasalready"] = "%s vam je poskušal dati %s, vendar že imate to orožje",
- ["received_weapon_noweapon"] = "%s vam je poskušal dati strelivo za %s, vendar nimate tega orožja",
- ["gave_account_money"] = "Dajanje $%s (%s) do %s",
- ["received_account_money"] = "Dobil $%s (%s) od %s",
- ["amount_invalid"] = "Neveljavna količina",
- ["players_nearby"] = "V blizini ni ljudi",
- ["ex_inv_lim"] = "Dejanja ni mogoče izvesti, saj presega največjo težo %s",
- ["imp_invalid_quantity"] = "Dejanja ni mogoče izvesti, količina je neveljavna",
- ["imp_invalid_amount"] = "Dejanja ni mogoče izvesti, znesek je neveljaven",
- ["threw_standard"] = "Metanje %sx %s",
- ["threw_account"] = "Metanje $%s %s",
- ["threw_weapon"] = "Metanje %s",
- ["threw_weapon_ammo"] = "Metanje %s z ~o~%sx %s",
- ["threw_weapon_already"] = "Ti ze imas to orozje",
- ["threw_cannot_pickup"] = "Shramba je poln, nemorem pobrati!",
- ["threw_pickup_prompt"] = "Pritisni E da poberes",
-
- -- Key mapping
- ["keymap_showinventory"] = "Pokazi Shrambo",
-
-- Salary related
["received_salary"] = "Vi ste plačali: $%s",
["received_help"] = "Vi ste placali svoj CEK v vrednosti: $%s",
diff --git a/[core]/es_extended/locales/sr.lua b/[core]/es_extended/locales/sr.lua
index fb76e019..2eece0a8 100644
--- a/[core]/es_extended/locales/sr.lua
+++ b/[core]/es_extended/locales/sr.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventar ( Težina %s / %s )",
- ["use"] = "Koristi",
- ["give"] = "Daj",
- ["remove"] = "Baci",
- ["return"] = "Nazad",
- ["give_to"] = "Daj",
- ["amount"] = "Količina",
- ["giveammo"] = "Daj municiju",
- ["amountammo"] = "Količina municije",
- ["noammo"] = "Nemate dovoljno!",
- ["gave_item"] = "Davanje %sx %s igraču %s",
- ["received_item"] = "Dobijeno %sx %s od %s",
- ["gave_weapon"] = "Davanje %s igraču %s",
- ["gave_weapon_ammo"] = "Davanje ~o~%sx %s za %s igraču %s",
- ["gave_weapon_withammo"] = "Davanje %s sa ~o~%sx %s igraču %s",
- ["gave_weapon_hasalready"] = "%s već ima %s",
- ["gave_weapon_noweapon"] = "%s nema to oružje",
- ["received_weapon"] = "Dobijeno %s od %s",
- ["received_weapon_ammo"] = "Dobijeno ~o~%sx %s za vaš %s od %s",
- ["received_weapon_withammo"] = "Dobijeno %s sa ~o~%sx %s od %s",
- ["received_weapon_hasalready"] = "%s je pokušao da Vam da %s, ali vi već imate to oružje",
- ["received_weapon_noweapon"] = "%s je pokušao da Vam da municiju za %s, ali vi nemate to oružje",
- ["gave_account_money"] = "Davanje $%s (%s) igraču %s",
- ["received_account_money"] = "Dobijeno $%s (%s) od %s",
- ["amount_invalid"] = "Nevažeća količina",
- ["players_nearby"] = "Nema igrača u blizini",
- ["ex_inv_lim"] = "Ne možete uraditi to, premašuje max težinu od %s",
- ["imp_invalid_quantity"] = "Nevažeća količina",
- ["imp_invalid_amount"] = "Nevažeći iznos",
- ["threw_standard"] = "Bacanje %sx %s",
- ["threw_account"] = "Bacanje $%s %s",
- ["threw_weapon"] = "Bacanje %s",
- ["threw_weapon_ammo"] = "Bacanje %s sa ~o~%sx %s",
- ["threw_weapon_already"] = "Vi već imate to oružje",
- ["threw_cannot_pickup"] = "Inventar je pun, ne možete pokupiti to!",
- ["threw_pickup_prompt"] = "Pritisni E da pokupiš",
-
- -- Key mapping
- ["keymap_showinventory"] = "Otvaranje inventara",
-
-- Salary related
["received_salary"] = "Plaćeno Vam je: $%s",
["received_help"] = "Isplaćen Vam je ček: $%s",
diff --git a/[core]/es_extended/locales/sv.lua b/[core]/es_extended/locales/sv.lua
index 14e45b40..ad1c073c 100644
--- a/[core]/es_extended/locales/sv.lua
+++ b/[core]/es_extended/locales/sv.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Inventory ( Vikt %s / %s )",
- ["use"] = "Använd",
- ["give"] = "Ge",
- ["remove"] = "Kasta",
- ["return"] = "Tillbaka",
- ["give_to"] = "Ge",
- ["amount"] = "Antal",
- ["giveammo"] = "Ge skott",
- ["amountammo"] = "Antal skott",
- ["noammo"] = "Inte tillräckligt!",
- ["gave_item"] = "Ger %sx %s till %s",
- ["received_item"] = "Mottog %sx %s från %s",
- ["gave_weapon"] = "Ger %s till %s",
- ["gave_weapon_ammo"] = "Ger ~o~%sx %s för %s till %s",
- ["gave_weapon_withammo"] = "Ger %s med ~o~%sx %s till %s",
- ["gave_weapon_hasalready"] = "%s har redan en %s",
- ["gave_weapon_noweapon"] = "%s har inte detta vapen",
- ["received_weapon"] = "Mottog %s från %s",
- ["received_weapon_ammo"] = "Mottog ~o~%sx %s för din %s från %s",
- ["received_weapon_withammo"] = "Mottog %s med ~o~%sx %s från %s",
- ["received_weapon_hasalready"] = "%s har försökt ge dig en %s, men du har redan detta",
- ["received_weapon_noweapon"] = "%s har försökt ge dig skott till en %s, men du har inte detta vapen",
- ["gave_account_money"] = "Ger %skr (%s) till %s",
- ["received_account_money"] = "Mottog %skr (%s) från %s",
- ["amount_invalid"] = "Ogiltig mängd",
- ["players_nearby"] = "Inga spelare nära",
- ["ex_inv_lim"] = "Kan inte utföra, överskrider maxvikten på %s",
- ["imp_invalid_quantity"] = "Kan inte utföra, mängden är ogiltig",
- ["imp_invalid_amount"] = "Kan inte utföra, antalet är ogiltig",
- ["threw_standard"] = "Kastar %sx %s",
- ["threw_account"] = "Kastar %skr %s",
- ["threw_weapon"] = "Kastar %s",
- ["threw_weapon_ammo"] = "Kastar %s med ~o~%sx %s",
- ["threw_weapon_already"] = "Du har redan detta vapen",
- ["threw_cannot_pickup"] = "Inventoryt är fullt, kan inte plocka upp!",
- ["threw_pickup_prompt"] = "Tryck E för att plocka upp",
-
- -- Key mapping
- ["keymap_showinventory"] = "Öppna inventory",
-
-- Salary related
["received_salary"] = "Du har fått ditt bidrag: %skr",
["received_help"] = "Du har fått betalt: %skr",
diff --git a/[core]/es_extended/locales/tr.lua b/[core]/es_extended/locales/tr.lua
index 6c0f9edb..fc97415a 100644
--- a/[core]/es_extended/locales/tr.lua
+++ b/[core]/es_extended/locales/tr.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "Envanter ( Ağırlık %s / %s )",
- ["use"] = "Kullan",
- ["give"] = "Ver",
- ["remove"] = "At",
- ["return"] = "Geri Ver",
- ["give_to"] = "Şuna Ver",
- ["amount"] = "Miktar",
- ["giveammo"] = "Mermi Ver",
- ["amountammo"] = "Mermi Miktarı",
- ["noammo"] = "Yeterli Değil!",
- ["gave_item"] = "Verilen %sx %s %s'ye",
- ["received_item"] = "Alınan %sx %s %s'den",
- ["gave_weapon"] = "Verilen %s %s'ye",
- ["gave_weapon_ammo"] = "Verilen ~o~%sx %s %s için %s'ye",
- ["gave_weapon_withammo"] = "Verilen %s ile ~o~%sx %s %s'ye",
- ["gave_weapon_hasalready"] = "%s Zaten Bir %s Sahip",
- ["gave_weapon_noweapon"] = "%s O Silahı Sahip Değil",
- ["received_weapon"] = "%s'den %s Alındı",
- ["received_weapon_ammo"] = "%s'den %s için ~o~%sx %s Alındı",
- ["received_weapon_withammo"] = "%s'den %s ile ~o~%sx %s Alındı",
- ["received_weapon_hasalready"] = "%s Size Bir %s Vermeye Çalıştı, Ama Zaten Bu Silahınız Var",
- ["received_weapon_noweapon"] = "%s Size Bir %s İçin Mermi Vermeye Çalıştı, Ama Bu Silaha Sahip Değilsiniz",
- ["gave_account_money"] = "Verilen $%s (%s) %s'ye",
- ["received_account_money"] = "Alınan $%s (%s) %s'den",
- ["amount_invalid"] = "Geçersiz Miktar",
- ["players_nearby"] = "Yakınlarda Hiçbir Oyuncu Yok",
- ["ex_inv_lim"] = "İşlem Yapılamaz, %s Ağırlık Sınırı Aşıldı",
- ["imp_invalid_quantity"] = "İşlem Yapılamaz, Miktar Geçersiz",
- ["imp_invalid_amount"] = "İşlem Yapılamaz, Miktar Geçersiz",
- ["threw_standard"] = "Atılan %sx %s",
- ["threw_account"] = "Atılan $%s %s",
- ["threw_weapon"] = "Atılan %s",
- ["threw_weapon_ammo"] = "Atılan %s ile ~o~%sx %s",
- ["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",
diff --git a/[core]/es_extended/locales/zh-cn.lua b/[core]/es_extended/locales/zh-cn.lua
index 119d2779..55534cf5 100644
--- a/[core]/es_extended/locales/zh-cn.lua
+++ b/[core]/es_extended/locales/zh-cn.lua
@@ -1,45 +1,4 @@
return {
- -- Inventory
- ["inventory"] = "物品栏 (负重 %s / %s)",
- ["use"] = "使用",
- ["give"] = "赠予",
- ["remove"] = "丢弃",
- ["return"] = "返回",
- ["give_to"] = "赠予目标",
- ["amount"] = "数量",
- ["giveammo"] = "赠予弹药",
- ["amountammo"] = "弹药数量",
- ["noammo"] = "弹药不足!",
- ["gave_item"] = "您将 %s 个 %s 赠予给 %s",
- ["received_item"] = "您收到 %s 个 %s, 由 %s 的赠予",
- ["gave_weapon"] = "您将 %s 赠予给 %s",
- ["gave_weapon_ammo"] = "您将 ~o~%s 发 %s %s 赠予 %s",
- ["gave_weapon_withammo"] = "您把 %s 及 ~o~%s 发 %s 赠予 %s",
- ["gave_weapon_hasalready"] = "%s 已拥有 %s",
- ["gave_weapon_noweapon"] = "%s 未拥有该武器",
- ["received_weapon"] = "您收到 %s, 由 %s 赠",
- ["received_weapon_ammo"] = "您收到 ~o~%s 发 %s 的%s, 由 %s 赠予",
- ["received_weapon_withammo"] = "您收到 %s 及 ~o~%s 发 %s, 由 %s 赠予",
- ["received_weapon_hasalready"] = "%s 试图赠予您 %s, 但您已拥有",
- ["received_weapon_noweapon"] = "%s 试图赠予您 %s 发弹药, 但您未装备该武器",
- ["gave_account_money"] = "您将 ¥%s (%s) 转账至 %s",
- ["received_account_money"] = "您收到 ¥%s (%s), 由 %s 转账",
- ["amount_invalid"] = "无效数量",
- ["players_nearby"] = "附近暂无其他人员",
- ["ex_inv_lim"] = "操作失败: 超过最大负重限制 (%s)",
- ["imp_invalid_quantity"] = "操作失败: 无效数量输入",
- ["imp_invalid_amount"] = "操作失败: 无效金额输入",
- ["threw_standard"] = "您已丢弃 %s 个 %s",
- ["threw_account"] = "您已丢弃 ¥%s 笔 %s",
- ["threw_weapon"] = "您已丢弃武器 %s",
- ["threw_weapon_ammo"] = "您已丢弃 %s 及其 ~o~%s 发 %s",
- ["threw_weapon_already"] = "您已持有相同武器!",
- ["threw_cannot_pickup"] = "物品栏已满, 无法拾取!",
- ["threw_pickup_prompt"] = "键下 [E] 拾取",
-
- -- Key mapping
- ["keymap_showinventory"] = "显示物品栏",
-
-- Salary related
["received_salary"] = "您已收到工资: ¥%s",
["received_help"] = "您已领取补助金: ¥%s",
diff --git a/[core]/esx_inventory/client/main.lua b/[core]/esx_inventory/client/main.lua
new file mode 100644
index 00000000..66577af5
--- /dev/null
+++ b/[core]/esx_inventory/client/main.lua
@@ -0,0 +1,223 @@
+---@class InventoryElement
+---@field type "item_account" | "item_standard" | "item_weapon"
+---@field label string
+---@field icon string
+---@field count number
+---@field value string
+---@field usable boolean
+---@field rare boolean
+---@field canRemove boolean
+---@field unselectable boolean?
+---@field ammo number?
+---@field canGiveAmmo boolean?
+
+---@alias InventoryAction "use" | "give" | "remove" | "give_ammo" | "return"
+
+if not ESX.GetConfig("EnableDefaultInventory") then
+ error("ESX Default Inventory is disabled in config, please enable it to use this resource.")
+end
+
+--------------------------------
+-- Inventory Element Builders --
+--------------------------------
+
+---@param elements InventoryElement[]
+local function appendAccounts(elements)
+ for i = 1, #(ESX.PlayerData.accounts) do
+ local account = ESX.PlayerData.accounts[i]
+ if account.money > 0 then
+ local formattedMoney = TranslateCap("locale_currency", ESX.Math.GroupDigits(account.money))
+ local canDrop = account.name ~= "bank"
+ elements[#elements + 1] = {
+ type = "item_account",
+ label = ('%s: %s'):format(account.label, formattedMoney),
+ icon = "fas fa-money-bill-wave",
+ count = account.money,
+ value = account.name,
+ usable = false,
+ rare = false,
+ canRemove = canDrop
+ }
+ end
+ end
+end
+
+---@param elements InventoryElement[]
+---@return number
+local function appendItems(elements)
+ local weight = 0
+ for _, v in ipairs(ESX.PlayerData.inventory) do
+ if v.count > 0 then
+ weight = weight + (v.weight * v.count)
+ elements[#elements + 1] = {
+ type = "item_standard",
+ label = ("%s x%s"):format(v.label, v.count),
+ icon = "fas fa-box",
+ count = v.count,
+ value = v.name,
+ usable = v.usable,
+ rare = v.rare,
+ canRemove = v.canRemove
+ }
+ end
+ end
+ return weight
+end
+
+---@param elements InventoryElement[]
+---@return number
+local function appendLoadout(elements)
+ local weight = 0
+ for _, weapon in ipairs(ESX.GetConfig("Weapons")) do
+ local weaponHash = joaat(weapon.name)
+ if HasPedGotWeapon(ESX.PlayerData.ped, weaponHash, false) then
+ local ammo = GetAmmoInPedWeapon(ESX.PlayerData.ped, weaponHash)
+ local label = weapon.ammo and ("%s - %s %s"):format(weapon.label, ammo, weapon.ammo.label) or weapon.label
+ elements[#elements + 1] = {
+ type = "item_weapon",
+ label = label,
+ icon = "fas fa-gun",
+ count = 1,
+ value = weapon.name,
+ usable = false,
+ rare = false,
+ ammo = ammo,
+ canGiveAmmo = (weapon.ammo ~= nil),
+ canRemove = true
+ }
+ end
+ end
+ return weight
+end
+
+---@return InventoryElement[], number
+local function buildInventoryElements()
+ local elements = {} ---@type InventoryElement[]
+ local totalWeight = 0
+ appendAccounts(elements)
+ totalWeight += appendItems(elements)
+ totalWeight += appendLoadout(elements)
+ ---@diagnostic disable-next-line: missing-fields
+ elements[#elements + 1] = {
+ label = "Current Weight: " .. totalWeight,
+ icon = "fas fa-box",
+ unselectable = true
+ }
+ return elements, totalWeight
+end
+
+---------------------------------
+-- Item Action Menu & Handling --
+---------------------------------
+
+---@param selected InventoryElement
+---@param playerNearby boolean
+---@return table
+local function buildItemActionMenu(selected, playerNearby)
+ local elements2 = {}
+ if selected.usable then
+ elements2[#elements2 + 1] = { action = "use", label = TranslateCap("use"), icon = "fas fa-utensils", type = selected.type, value = selected.value }
+ end
+ if selected.canRemove then
+ if playerNearby then
+ elements2[#elements2 + 1] = { action = "give", label = TranslateCap("give"), icon = "fas fa-hands", type = selected.type, value = selected.value }
+ end
+ elements2[#elements2 + 1] = { action = "remove", label = TranslateCap("remove"), icon = "fas fa-trash", type = selected.type, value = selected.value }
+ end
+ if selected.type == "item_weapon" and selected.canGiveAmmo and selected.ammo > 0 and playerNearby then
+ elements2[#elements2 + 1] = { action = "give_ammo", label = TranslateCap("giveammo"), icon = "fas fa-gun", type = selected.type, value = selected.value }
+ end
+ elements2[#elements2 + 1] = { action = "return", label = TranslateCap("return"), icon = "fas fa-arrow-left" }
+ return elements2
+end
+
+---@param title string
+---@param maxCount number
+---@param cb function
+local function openQuantityDialog(title, maxCount, cb)
+ ESX.UI.Menu.Open("dialog", ESX.currentResourceName, "esx_quantity_dialog", {
+ title = title
+ }, function(data, menu)
+ local qty = tonumber(data.value)
+ if not qty or qty <= 0 or qty > maxCount then
+ ESX.ShowNotification(TranslateCap("amount_invalid"))
+ else
+ menu.close()
+ cb(qty)
+ end
+ end, function(_, menu) menu.close() end)
+end
+
+---@param action InventoryAction
+---@param selected InventoryElement
+---@param closestPlayer number
+local function handleInventoryAction(action, selected, closestPlayer)
+ local itemType, itemName, playerPed = selected.type, selected.value, ESX.PlayerData.ped
+ if action == "give" then
+ openQuantityDialog(TranslateCap("amount"), selected.count, function(qty)
+ TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), itemType, itemName, qty)
+ end)
+ elseif action == "remove" then
+ openQuantityDialog(TranslateCap("amount"), selected.count, function(qty)
+ TriggerServerEvent("esx:removeInventoryItem", itemType, itemName, qty)
+ end)
+ elseif action == "use" then
+ TriggerServerEvent("esx:useItem", itemName)
+ elseif action == "give_ammo" then
+ local pedAmmo = GetAmmoInPedWeapon(playerPed, joaat(itemName))
+ openQuantityDialog(TranslateCap("amount"), pedAmmo, function(qty)
+ TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), "item_ammo", itemName, qty)
+ end)
+ end
+end
+
+----------------------
+-- Main Inventory UI --
+----------------------
+
+local function showInventory()
+ ESX.PlayerData = ESX.GetPlayerData()
+ local elements, totalWeight = buildInventoryElements()
+ ESX.UI.Menu.Open("default", ESX.currentResourceName, "esx_inventory_main", {
+ title = TranslateCap("inventory", totalWeight, ESX.GetConfig("MaxWeight")),
+ elements = elements,
+ }, function(data, menu)
+ local selected = data.current --[[@as InventoryElement]]
+ if selected.unselectable then return end
+
+ local closestPlayer, dist = ESX.Game.GetClosestPlayer()
+ local playerNearby = closestPlayer ~= -1 and dist <= 3.0
+
+ ESX.UI.Menu.Open("default", ESX.currentResourceName, "esx_inventory_actions", {
+ title = selected.label,
+ elements = buildItemActionMenu(selected, playerNearby),
+ }, function(data2, menu2)
+ local action = data2.current.action
+ if action == "return" then
+ menu2.close()
+ return
+ end
+ handleInventoryAction(action, selected, closestPlayer)
+ end, function(_, menu2) menu2.close() end)
+ end, function(_, menu) menu.close() end)
+end
+exports("ShowInventory", showInventory)
+
+ESX.RegisterInput("showinv", TranslateCap("keymap_showinventory"), "keyboard", "F2", function()
+ if not ESX.PlayerData.dead then
+ showInventory()
+ end
+end)
+
+local function refreshInventory()
+ if not ESX.UI.Menu.IsOpen("default", ESX.currentResourceName, "esx_inventory_main") and
+ not ESX.UI.Menu.IsOpen("default", ESX.currentResourceName, "esx_inventory_actions") and
+ not ESX.UI.Menu.IsOpen("dialog", ESX.currentResourceName, "esx_quantity_dialog") then
+ return
+ end
+ Citizen.Wait(0)
+ ESX.UI.Menu.CloseAll()
+ showInventory()
+end
+RegisterNetEvent("esx:addInventoryItem", refreshInventory)
+RegisterNetEvent("esx:removeInventoryItem", refreshInventory)
diff --git a/[core]/esx_inventory/config/main.lua b/[core]/esx_inventory/config/main.lua
new file mode 100644
index 00000000..597c5160
--- /dev/null
+++ b/[core]/esx_inventory/config/main.lua
@@ -0,0 +1,3 @@
+Config = {
+ Locale = "en",
+}
diff --git a/[core]/esx_inventory/fxmanifest.lua b/[core]/esx_inventory/fxmanifest.lua
new file mode 100644
index 00000000..3b1ea9ad
--- /dev/null
+++ b/[core]/esx_inventory/fxmanifest.lua
@@ -0,0 +1,24 @@
+fx_version "cerulean"
+
+game "gta5"
+description "Inventory for the ESX framework"
+lua54 "yes"
+version "1.13.1"
+
+shared_scripts {
+ "/config/main.lua",
+ "@es_extended/imports.lua",
+ "@es_extended/locale.lua",
+}
+
+client_scripts {
+ "/client/main.lua",
+}
+
+server_scripts {
+ "/server/main.lua",
+}
+
+files {
+ "/locales/*.lua"
+}
diff --git a/[core]/esx_inventory/locales/cs.lua b/[core]/esx_inventory/locales/cs.lua
new file mode 100644
index 00000000..aeffb4c7
--- /dev/null
+++ b/[core]/esx_inventory/locales/cs.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventář ( Váha %s / %s )",
+ ["use"] = "Použít",
+ ["give"] = "Darovat",
+ ["remove"] = "Odhodit",
+ ["return"] = "Vrátit",
+ ["give_to"] = "Darováno",
+ ["amount"] = "Počet",
+ ["giveammo"] = "Podat náboje",
+ ["amountammo"] = "Počet nábojů",
+ ["noammo"] = "Nedostatek!",
+ ["gave_item"] = "Daroval %sx %s pro %s",
+ ["received_item"] = "Získáno %sx %s od %s",
+ ["gave_weapon"] = "Předání %s pro %s",
+ ["gave_weapon_ammo"] = "Darování ~o~%sx %s do %s pro %s",
+ ["gave_weapon_withammo"] = "Darování %s s ~o~%sx %s pro %s",
+ ["gave_weapon_hasalready"] = "%s již vlastní %s",
+ ["gave_weapon_noweapon"] = "%s nemá tuto zbraň",
+ ["received_weapon"] = "Obdrženo %s od %s",
+ ["received_weapon_ammo"] = "Obdrženo ~o~%sx %s pro zbraň %s od %s",
+ ["received_weapon_withammo"] = "Obdrženo %s s ~o~%sx %s od %s",
+ ["received_weapon_hasalready"] = "%s se snažil darovat %s, ale již tuto zbraň máš",
+ ["received_weapon_noweapon"] = "%s se snažil ti dát náboje %s, ale nemáš potřebnou zbrań",
+ ["gave_account_money"] = "Darováno $%s (%s) pro %s",
+ ["received_account_money"] = "Získáno $%s (%s) od %s",
+ ["amount_invalid"] = "Špatné množství",
+ ["players_nearby"] = "Žádný hráč není poblíž",
+ ["ex_inv_lim"] = "Nelze sebrat,protože máš plné kapsy %s",
+ ["imp_invalid_quantity"] = "Neplatné množství",
+ ["imp_invalid_amount"] = "Nelze provést, neplatné množství",
+ ["threw_standard"] = "Zahozeno %sx %s",
+ ["threw_account"] = "Zahozeno $%s %s",
+ ["threw_weapon"] = "Zahozeno %s",
+ ["threw_weapon_ammo"] = "Zahozeno %s s ~o~%sx %s",
+ ["threw_weapon_already"] = "Již vlastníš tuto zbraň",
+ ["threw_cannot_pickup"] = "Kapsy máš plné, nemůžeš sebrat!",
+ ["threw_pickup_prompt"] = "Zmáčkni E pro sebrání!",
+ ["keymap_showinventory"] = "Otevřít inventář",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/de.lua b/[core]/esx_inventory/locales/de.lua
new file mode 100644
index 00000000..0f8218c8
--- /dev/null
+++ b/[core]/esx_inventory/locales/de.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventar ( Gewicht %s / %s )",
+ ["use"] = "Benutzen",
+ ["give"] = "Geben",
+ ["remove"] = "Entsorgen",
+ ["return"] = "Zurück",
+ ["give_to"] = "Geben an",
+ ["amount"] = "Anzahl",
+ ["giveammo"] = "Munition geben",
+ ["amountammo"] = "Munitions Anzahl",
+ ["noammo"] = "Nicht Genug!",
+ ["gave_item"] = "Du gibst %sx %s an %s",
+ ["received_item"] = "Du bekommst %sx %s von %s",
+ ["gave_weapon"] = "Du gibst %s an %s",
+ ["gave_weapon_ammo"] = "Du gibst ~o~%sx %s für %s an %s",
+ ["gave_weapon_withammo"] = "Du gibst %s mit ~o~%sx %s an %s",
+ ["gave_weapon_hasalready"] = "%s hat bereits %s",
+ ["gave_weapon_noweapon"] = "%s hat diese Waffe nicht",
+ ["received_weapon"] = "Du bekommst %s von %s",
+ ["received_weapon_ammo"] = "Du bekommst ~o~%sx %s für deine %s von %s",
+ ["received_weapon_withammo"] = "Du bekommst %s mit ~o~%sx %s von %s",
+ ["received_weapon_hasalready"] = "%s hat versucht dir eine %s zu geben, jedoch hast du diese Waffe bereits!",
+ ["received_weapon_noweapon"] = "%s hat versucht dir Munition für eine %s zu geben, jedoch hast du diese Waffe nicht!",
+ ["gave_account_money"] = "Du gibst %s€ (%s) an %s",
+ ["received_account_money"] = "Du bekommst %s€ (%s) von %s",
+ ["amount_invalid"] = "Ungültige Anzahl",
+ ["players_nearby"] = "Keine Personen in der Nähe!",
+ ["ex_inv_lim"] = "Du kannst diese Aktion nicht ausführen!, Inventarlimit für %s überschritten.",
+ ["imp_invalid_quantity"] = "Du kannst diese Aktion nicht ausführen!, Ungültige Anzahl!",
+ ["imp_invalid_amount"] = "Du kannst diese Aktion nicht ausführen!, Ungültige Anzahl",
+ ["threw_standard"] = "Du entsorgst %sx %s",
+ ["threw_account"] = "Du Entsorgst %s€ %s",
+ ["threw_weapon"] = "Du entsorgst %s",
+ ["threw_weapon_ammo"] = "Du entsorgst %s mit ~o~%sx %s",
+ ["threw_weapon_already"] = "Du hast diese Waffe bereits!",
+ ["threw_cannot_pickup"] = "Inventar ist voll! Du kannst dies nicht aufheben",
+ ["threw_pickup_prompt"] = "Drücke [E] zum aufheben",
+ ["keymap_showinventory"] = "Inventar Anzeigen",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/el.lua b/[core]/esx_inventory/locales/el.lua
new file mode 100644
index 00000000..ea62899e
--- /dev/null
+++ b/[core]/esx_inventory/locales/el.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Αποθήκη ( Βάρος %s / %s )",
+ ["use"] = "Χρήση",
+ ["give"] = "Δώσε",
+ ["remove"] = "Πέτα",
+ ["return"] = "Επιστροφή",
+ ["give_to"] = "Δώσε σε",
+ ["amount"] = "Ποσότητα",
+ ["giveammo"] = "Δώσε σφαίρες",
+ ["amountammo"] = "Ποσότητα σφαιρών",
+ ["noammo"] = "Δεν υπάρχουν αρκετές σφαίρες!",
+ ["gave_item"] = "Δώσατε %sx %s στον/στην %s",
+ ["received_item"] = "Λάβατε %sx %s από τον/την %s",
+ ["gave_weapon"] = "Δίνετε %s στον/στην %s",
+ ["gave_weapon_ammo"] = "Δίνετε ~o~%sx %s για %s στον/στην %s",
+ ["gave_weapon_withammo"] = "Δίνετε %s με ~o~%sx %s στον/στην %s",
+ ["gave_weapon_hasalready"] = "Ο/Η %s έχει ήδη ένα %s",
+ ["gave_weapon_noweapon"] = "Ο/Η %s δεν έχει αυτό το όπλο",
+ ["received_weapon"] = "Λάβατε %s από τον/την %s",
+ ["received_weapon_ammo"] = "Λάβατε ~o~%sx %s για το %s από τον/την %s",
+ ["received_weapon_withammo"] = "Λάβατε %s για ~o~%sx %s από τον/την %s",
+ ["received_weapon_hasalready"] = "Ο/Η %s προσπάθησε να σας δώσει ένα %s, αλλά το έχετε ήδη",
+ ["received_weapon_noweapon"] = "Ο/Η %s προσπάθησε να σας δώσει σφαίρες για το %s, αλλά δεν έχετε αυτό το όπλο",
+ ["gave_account_money"] = "Δίνετε $%s (%s) στον/στην %s",
+ ["received_account_money"] = "Λάβατε $%s (%s) από τον/την %s",
+ ["amount_invalid"] = "Μη έγκυρη ποσότητα",
+ ["players_nearby"] = "Δεν υπάρχουν κοντινοί παίκτες",
+ ["ex_inv_lim"] = "Δεν είναι δυνατή η ενέργεια, υπέρβαση του μέγιστου βάρους των %s",
+ ["imp_invalid_quantity"] = "Δεν είναι δυνατή η ενέργεια, η ποσότητα δεν είναι έγκυρη",
+ ["imp_invalid_amount"] = "Δεν είναι δυνατή η ενέργεια, το ποσό δεν είναι έγκυρο",
+ ["threw_standard"] = "Ρίχνοντας %sx %s",
+ ["threw_account"] = "Ρίχνοντας $%s %s",
+ ["threw_weapon"] = "Ρίχνοντας %s",
+ ["threw_weapon_ammo"] = "Ρίχνοντας %s με ~o~%sx %s",
+ ["threw_weapon_already"] = "Ήδη έχετε αυτό το όπλο",
+ ["threw_cannot_pickup"] = "Η αποθήκη είναι γεμάτη, δεν μπορείτε να σηκώσετε!",
+ ["threw_pickup_prompt"] = "Πατήστε E για να σηκώσετε",
+ ["keymap_showinventory"] = "Εμφάνιση Αποθήκης",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/en.lua b/[core]/esx_inventory/locales/en.lua
new file mode 100644
index 00000000..ba7bffce
--- /dev/null
+++ b/[core]/esx_inventory/locales/en.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventory ( Weight %s / %s )",
+ ["use"] = "Use",
+ ["give"] = "Give",
+ ["remove"] = "Throw",
+ ["return"] = "Return",
+ ["give_to"] = "Give to",
+ ["amount"] = "Amount",
+ ["giveammo"] = "Give ammo",
+ ["amountammo"] = "Ammo Amount",
+ ["noammo"] = "Not Enough!",
+ ["gave_item"] = "Giving %sx %s to %s",
+ ["received_item"] = "Received %sx %s from %s",
+ ["gave_weapon"] = "Giving %s to %s",
+ ["gave_weapon_ammo"] = "Giving ~o~%sx %s for %s to %s",
+ ["gave_weapon_withammo"] = "Giving %s with ~o~%sx %s to %s",
+ ["gave_weapon_hasalready"] = "%s already has a %s",
+ ["gave_weapon_noweapon"] = "%s does not have that weapon",
+ ["received_weapon"] = "Received %s from %s",
+ ["received_weapon_ammo"] = "Received ~o~%sx %s for your %s from %s",
+ ["received_weapon_withammo"] = "Received %s with ~o~%sx %s from %s",
+ ["received_weapon_hasalready"] = "%s has attempted to give you a %s, but you already this weapon",
+ ["received_weapon_noweapon"] = "%s has attempted to give you ammo for a %s, but you do not have this weapon",
+ ["gave_account_money"] = "Giving $%s (%s) to %s",
+ ["received_account_money"] = "Received $%s (%s) from %s",
+ ["amount_invalid"] = "Invalid quantity",
+ ["players_nearby"] = "No nearby Players",
+ ["ex_inv_lim"] = "Cannot perfom action,exceeding max weight of %s",
+ ["imp_invalid_quantity"] = "Cannot perfom action, the quantity is invalid",
+ ["imp_invalid_amount"] = "Cannot perfom action, the amount is invalid",
+ ["threw_standard"] = "Throwing %sx %s",
+ ["threw_account"] = "Throwing $%s %s",
+ ["threw_weapon"] = "Throwing %s",
+ ["threw_weapon_ammo"] = "Throwing %s with ~o~%sx %s",
+ ["threw_weapon_already"] = "You already have this weapon",
+ ["threw_cannot_pickup"] = "Inventory is full, Cannot Pickup!",
+ ["threw_pickup_prompt"] = "Press E to Pickup",
+ ["keymap_showinventory"] = "Show Inventory",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/es.lua b/[core]/esx_inventory/locales/es.lua
new file mode 100644
index 00000000..9e529a90
--- /dev/null
+++ b/[core]/esx_inventory/locales/es.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventario (Peso %s / %s)",
+ ["use"] = "Usar",
+ ["give"] = "Dar",
+ ["remove"] = "Tirar",
+ ["return"] = "Devolver",
+ ["give_to"] = "Dar a",
+ ["amount"] = "Cantidad",
+ ["giveammo"] = "Dar munición",
+ ["amountammo"] = "Cantidad de munición",
+ ["noammo"] = "¡Insuficiente!",
+ ["gave_item"] = "Dando %sx %s a %s",
+ ["received_item"] = "Recibido %sx %s de %s",
+ ["gave_weapon"] = "Dando %s a %s",
+ ["gave_weapon_ammo"] = "Dando ~o~%sx %s para %s a %s",
+ ["gave_weapon_withammo"] = "Dando %s con ~o~%sx %s a %s",
+ ["gave_weapon_hasalready"] = "%s ya tiene un %s",
+ ["gave_weapon_noweapon"] = "%s no tiene esa arma",
+ ["received_weapon"] = "Recibido %s de %s",
+ ["received_weapon_ammo"] = "Recibido ~o~%sx %s para tu %s de %s",
+ ["received_weapon_withammo"] = "Recibido %s con ~o~%sx %s de %s",
+ ["received_weapon_hasalready"] = "%s ha intentado darte un %s, pero ya tienes esta arma",
+ ["received_weapon_noweapon"] = "%s ha intentado darte munición para un %s, pero no tienes esta arma",
+ ["gave_account_money"] = "Dando $%s (%s) a %s",
+ ["received_account_money"] = "Recibido $%s (%s) de %s",
+ ["amount_invalid"] = "Cantidad inválida",
+ ["players_nearby"] = "No hay jugadores cerca",
+ ["ex_inv_lim"] = "No se puede realizar la acción, se excede el peso máximo de %s",
+ ["imp_invalid_quantity"] = "No se puede realizar la acción, la cantidad es inválida",
+ ["imp_invalid_amount"] = "No se puede realizar la acción, la cantidad es inválida",
+ ["threw_standard"] = "Tirando %sx %s",
+ ["threw_account"] = "Tirando $%s %s",
+ ["threw_weapon"] = "Tirando %s",
+ ["threw_weapon_ammo"] = "Tirando %s con ~o~%sx %s",
+ ["threw_weapon_already"] = "Ya tienes esta arma",
+ ["threw_cannot_pickup"] = "¡Inventario lleno, no se puede recoger!",
+ ["threw_pickup_prompt"] = "Pulsa E para recoger",
+ ["keymap_showinventory"] = "Mostrar inventario",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/fi.lua b/[core]/esx_inventory/locales/fi.lua
new file mode 100644
index 00000000..5c30439d
--- /dev/null
+++ b/[core]/esx_inventory/locales/fi.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Reppu %s / %s",
+ ["use"] = "Käytä",
+ ["give"] = "Anna",
+ ["remove"] = "Poista",
+ ["return"] = "Takaisin",
+ ["give_to"] = "Anna henkilölle",
+ ["amount"] = "Määrä",
+ ["giveammo"] = "Anna ammuksia",
+ ["amountammo"] = "Ammusten määrä",
+ ["noammo"] = "Sinulla ei ole ammuksia!",
+ ["gave_item"] = "Sinä annoit %sx %s henkilölle %s",
+ ["received_item"] = "Sinä sait %sx %s henkilöltä %s",
+ ["gave_weapon"] = "Sinä annoit 1x %s henkilölle %s",
+ ["gave_weapon_ammo"] = "Annoit ~o~%sx %s kohteelle %s henkilölle %s",
+ ["gave_weapon_withammo"] = "Sinä annoit 1x %s ammuksella ~o~%sx %s henkilölle %s",
+ ["gave_weapon_hasalready"] = "%s omistaa jo %s",
+ ["gave_weapon_noweapon"] = "%s ei ole kyseistä asetta",
+ ["received_weapon"] = "Vastaanotit 1x %s henkilöltä %s",
+ ["received_weapon_ammo"] = "Sinä sait ~o~%sx %s sinun %s varten henkilöltä %s",
+ ["received_weapon_withammo"] = "Sinä sait 1x %s ammuksella ~o~%sx %s henkilöltä %s",
+ ["received_weapon_hasalready"] = "%s yritti antaa sinulle %s, mutta sinulla on jo sellainen",
+ ["received_weapon_noweapon"] = "%s yritti antaa sinulle ammuksia %s:lle, mutta sinulla ei ole sellaista",
+ ["gave_account_money"] = "Sinä annoit $%s (%s) henkilölle %s",
+ ["received_account_money"] = "Sinä sait $%s (%s) henkilöltä %s",
+ ["amount_invalid"] = "Virheellinen määrä",
+ ["players_nearby"] = "Ei pelaajia lähettyvillä",
+ ["ex_inv_lim"] = "Toiminto mahdoton, reppu alkaa olla täysi %s",
+ ["imp_invalid_quantity"] = "Toiminto mahdoton, virheellinen määrä",
+ ["imp_invalid_amount"] = "Toiminto mahdoton, virhellinen summa",
+ ["threw_standard"] = "Sinä heitit %sx %s",
+ ["threw_account"] = "Sinä heitit $%s %s",
+ ["threw_weapon"] = "Sinä heitit 1x %s",
+ ["threw_weapon_ammo"] = "Heitit 1x %s ammuksella ~o~%sx %s",
+ ["threw_weapon_already"] = "Sinulla on jo sama ase",
+ ["threw_cannot_pickup"] = "Et voi kerätä sitä, koska reppusi on täynnä",
+ ["threw_pickup_prompt"] = "Paina E kerätäksesi",
+ ["keymap_showinventory"] = "Avaa reppu",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/fr.lua b/[core]/esx_inventory/locales/fr.lua
new file mode 100644
index 00000000..78f7ceac
--- /dev/null
+++ b/[core]/esx_inventory/locales/fr.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventaire ( Poids %s / %s )",
+ ["use"] = "Utiliser",
+ ["give"] = "Donner",
+ ["remove"] = "Jeter",
+ ["return"] = "Retour",
+ ["give_to"] = "Donner à",
+ ["amount"] = "Quantité",
+ ["giveammo"] = "Donner des munitions",
+ ["amountammo"] = "Nombre de munitions",
+ ["noammo"] = "Vous n'avez pas autant de munitions!",
+ ["gave_item"] = "Vous avez donné %sx %s à %s",
+ ["received_item"] = "Vous avez reçu %sx %s de %s",
+ ["gave_weapon"] = "Vous avez donné 1x %s à %s",
+ ["gave_weapon_ammo"] = "Vous avez donné ~o~%sx %s pour %s à %s",
+ ["gave_weapon_withammo"] = "Vous avez donné 1x %s avec ~o~%sx %s à %s",
+ ["gave_weapon_hasalready"] = "%s a déjà 1x %s",
+ ["gave_weapon_noweapon"] = "%s n'a pas cette arme",
+ ["received_weapon"] = "Vous avez reçu 1x %s de %s",
+ ["received_weapon_ammo"] = "Vous avez reçu ~o~%sx %s pour votre %s de %s",
+ ["received_weapon_withammo"] = "Vous avez reçu 1x %s avec ~o~%sx %s de %s",
+ ["received_weapon_hasalready"] = "%s a tenté de vous donner 1x %s, mais vous en aviez déjà un exemplaire",
+ ["received_weapon_noweapon"] = "%s a tenté de vous donner des munitions pour %s, mais vous n'avez pas cette arme",
+ ["gave_account_money"] = "Vous avez donné $%s (%s) à %s",
+ ["received_account_money"] = "Vous avez reçu $%s (%s) de %s",
+ ["amount_invalid"] = "Le montant est invalide",
+ ["players_nearby"] = "Aucun joueur n'est à proximité",
+ ["ex_inv_lim"] = "Action impossible, dépassement du poids maximum de %s",
+ ["imp_invalid_quantity"] = "Action impossible, la quantité est invalide",
+ ["imp_invalid_amount"] = "Action impossible, le montant est invalide",
+ ["threw_standard"] = "Vous avez jeté %sx %s",
+ ["threw_account"] = "Vous avez jeté $%s %s",
+ ["threw_weapon"] = "Vous avez jeté 1x %s",
+ ["threw_weapon_ammo"] = "Vous avez jeté 1x %s avec ~o~%sx %s",
+ ["threw_weapon_already"] = "Vous avez déjà cette arme",
+ ["threw_cannot_pickup"] = "Votre inventaire est plein, vous ne pouvez donc pas ramasser cela!",
+ ["threw_pickup_prompt"] = "Appuyez sur E pour ramasser",
+ ["keymap_showinventory"] = "Afficher l'inventaire",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/he.lua b/[core]/esx_inventory/locales/he.lua
new file mode 100644
index 00000000..3d62c0b3
--- /dev/null
+++ b/[core]/esx_inventory/locales/he.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "מלאי ( משקל %s / %s )",
+ ["use"] = "השתמש",
+ ["give"] = "תן",
+ ["remove"] = "זרוק",
+ ["return"] = "חזור",
+ ["give_to"] = "תן ל",
+ ["amount"] = "כמות",
+ ["giveammo"] = "תן תחמושת",
+ ["amountammo"] = "כמות תחמושת",
+ ["noammo"] = "לא מספיק!",
+ ["gave_item"] = "ניתן %sx %s ל %s",
+ ["received_item"] = "קיבלת %sx %s מ %s",
+ ["gave_weapon"] = "ניתן %s ל %s",
+ ["gave_weapon_ammo"] = "ניתן ~o~%sx %s ל %s ל %s",
+ ["gave_weapon_withammo"] = "ניתן %s עם ~o~%sx %s ל %s",
+ ["gave_weapon_hasalready"] = "%s כבר יש לו %s",
+ ["gave_weapon_noweapon"] = "%s אין לו את הנשק הזה",
+ ["received_weapon"] = "קיבלת %s מ %s",
+ ["received_weapon_ammo"] = "קיבלת ~o~%sx %s ל %s שלך מ %s",
+ ["received_weapon_withammo"] = "קיבלת %s עם ~o~%sx %s מ %s",
+ ["received_weapon_hasalready"] = "%s ניסה לתת לך %s, אך יש לך כבר נשק זה",
+ ["received_weapon_noweapon"] = "%s ניסה לתת לך תחמושת ל %s, אך אין לך נשק זה",
+ ["gave_account_money"] = "ניתן $%s (%s) ל %s",
+ ["received_account_money"] = "קיבלת $%s (%s) מ %s",
+ ["amount_invalid"] = "כמות לא חוקית",
+ ["players_nearby"] = "אין שחקנים קרובים",
+ ["ex_inv_lim"] = "לא ניתן לבצע פעולה, חורג מהמשקל המרבי של %s",
+ ["imp_invalid_quantity"] = "לא ניתן לבצע פעולה, הכמות אינה חוקית",
+ ["imp_invalid_amount"] = "לא ניתן לבצע פעולה, הסכום אינו חוקי",
+ ["threw_standard"] = "זורק %sx %s",
+ ["threw_account"] = "זורק $%s %s",
+ ["threw_weapon"] = "זורק %s",
+ ["threw_weapon_ammo"] = "זורק %s עם ~o~%sx %s",
+ ["threw_weapon_already"] = "כבר יש לך נשק זה",
+ ["threw_cannot_pickup"] = "המלאי מלא, לא ניתן לאסוף!",
+ ["threw_pickup_prompt"] = "לחץ E כדי לאסוף",
+ ["keymap_showinventory"] = "הצג מלאי",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/hu.lua b/[core]/esx_inventory/locales/hu.lua
new file mode 100644
index 00000000..64338675
--- /dev/null
+++ b/[core]/esx_inventory/locales/hu.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventory ( Súly %s / %s )",
+ ["use"] = "Használ",
+ ["give"] = "Átad",
+ ["remove"] = "Eldob",
+ ["return"] = "Visszatérés",
+ ["give_to"] = "Adni valakinek",
+ ["amount"] = "Mennyiség",
+ ["giveammo"] = "Lőszer adás",
+ ["amountammo"] = "Lőszer mennyiség",
+ ["noammo"] = "Nincsen több lövedéked!",
+ ["gave_item"] = "Átadtál: %sx %s neki: %s",
+ ["received_item"] = "Kaptál: %sx %s töle: %s",
+ ["gave_weapon"] = "Átadtál: %s neki: %s",
+ ["gave_weapon_ammo"] = "Átadtál ~o~%sx %s %s neki: %s",
+ ["gave_weapon_withammo"] = "Átadtál %s ~o~%sx %s neki: %s",
+ ["gave_weapon_hasalready"] = "%s már rendelkezik %s",
+ ["gave_weapon_noweapon"] = "%s nincsen ilyen fegyere",
+ ["received_weapon"] = "Kaptál: %s töle: %s",
+ ["received_weapon_ammo"] = "Kaptál ~o~%sx %s %s töle: %s",
+ ["received_weapon_withammo"] = "Kaptál %s ~o~%sx %s töle: %s",
+ ["received_weapon_hasalready"] = "%s megpróbálta átadni a következöt: %s, nem már van rendelkezel egy ilyennel",
+ ["received_weapon_noweapon"] = "%s átakart adni %s, de nincsen ilyen fegyvered",
+ ["gave_account_money"] = "Átadtál: $%s (%s) neki: %s",
+ ["received_account_money"] = "Kaptál: $%s (%s) töle: %s",
+ ["amount_invalid"] = "Érvénytelen mennyiség",
+ ["players_nearby"] = "Nincsen játékos a közeledben",
+ ["ex_inv_lim"] = "Nincsen elég szabad helyed %s",
+ ["imp_invalid_quantity"] = "Érvénytelen mennyiség",
+ ["imp_invalid_amount"] = "Érvénytelen összeg",
+ ["threw_standard"] = "Kidobtál: %sx %s",
+ ["threw_account"] = "Kidobtál: $%s %s",
+ ["threw_weapon"] = "Kidobtál: %s",
+ ["threw_weapon_ammo"] = "Kidobtál: %s ~o~%sx %s",
+ ["threw_weapon_already"] = "Van már ilyen fegyvered",
+ ["threw_cannot_pickup"] = "Nincsen elég szabad helyed",
+ ["threw_pickup_prompt"] = "E hogy felvedd",
+ ["keymap_showinventory"] = "Leltár mutatása",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/id.lua b/[core]/esx_inventory/locales/id.lua
new file mode 100644
index 00000000..941119ab
--- /dev/null
+++ b/[core]/esx_inventory/locales/id.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventaris ( Berat %s / %s )",
+ ["use"] = "Gunakan",
+ ["give"] = "Beri",
+ ["remove"] = "Buang",
+ ["return"] = "Kembali",
+ ["give_to"] = "Beri ke",
+ ["amount"] = "Jumlah",
+ ["giveammo"] = "Beri amunisi",
+ ["amountammo"] = "Jumlah Amunisi",
+ ["noammo"] = "Tidak cukup!",
+ ["gave_item"] = "Memberi %sx %s ke %s",
+ ["received_item"] = "Menerima %sx %s dari %s",
+ ["gave_weapon"] = "Memberi %s ke %s",
+ ["gave_weapon_ammo"] = "Memberi ~o~%sx %s untuk %s ke %s",
+ ["gave_weapon_withammo"] = "Memberi %s dengan ~o~%sx %s ke %s",
+ ["gave_weapon_hasalready"] = "%s sudah memiliki %s",
+ ["gave_weapon_noweapon"] = "%s tidak memiliki senjata tersebut",
+ ["received_weapon"] = "Menerima %s dari %s",
+ ["received_weapon_ammo"] = "Menerima ~o~%sx %s untuk %s Anda dari %s",
+ ["received_weapon_withammo"] = "Menerima %s dengan ~o~%sx %s dari %s",
+ ["received_weapon_hasalready"] = "%s mencoba memberimu %s, tapi kamu sudah memiliki senjata ini",
+ ["received_weapon_noweapon"] = "%s mencoba memberimu amunisi untuk %s, tapi kamu tidak memiliki senjata ini",
+ ["gave_account_money"] = "Memberi $%s (%s) ke %s",
+ ["received_account_money"] = "Menerima $%s (%s) dari %s",
+ ["amount_invalid"] = "Jumlah salah",
+ ["players_nearby"] = "Tidak ada Player di sekitar",
+ ["ex_inv_lim"] = "Tidak dapat melakukan aksi, melebihi batas berat dari %s",
+ ["imp_invalid_quantity"] = "Tidak dapat melakukan aksi, jumlah salah",
+ ["imp_invalid_amount"] = "Tidak dapat melakukan aksi, jumlah salah",
+ ["threw_standard"] = "Membuang %sx %s",
+ ["threw_account"] = "Membuang $%s %s",
+ ["threw_weapon"] = "Membuang %s",
+ ["threw_weapon_ammo"] = "Membuang %s dengan ~o~%sx %s",
+ ["threw_weapon_already"] = "Kamu sudah memiliki senjata ini",
+ ["threw_cannot_pickup"] = "Inventaris penuh, Tidak dapat mengambil!",
+ ["threw_pickup_prompt"] = "Tekan E untuk Mengambil",
+ ["keymap_showinventory"] = "Buka Inventaris",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/it.lua b/[core]/esx_inventory/locales/it.lua
new file mode 100644
index 00000000..e8f44d4b
--- /dev/null
+++ b/[core]/esx_inventory/locales/it.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventario ( Peso %s / %s )",
+ ["use"] = "Usa",
+ ["give"] = "Dai",
+ ["remove"] = "Butta",
+ ["return"] = "Ritorna",
+ ["give_to"] = "Dai a",
+ ["amount"] = "Quantità",
+ ["giveammo"] = "Dai munizioni",
+ ["amountammo"] = "Quantità munizioni",
+ ["noammo"] = "Non abbastanza!",
+ ["gave_item"] = "Dando %sx %s a %s",
+ ["received_item"] = "Ricevuto %sx %s da %s",
+ ["gave_weapon"] = "Dando %s a %s",
+ ["gave_weapon_ammo"] = "Dando ~o~%sx %s for %s to %s",
+ ["gave_weapon_withammo"] = "Dando %s con ~o~%sx %s a %s",
+ ["gave_weapon_hasalready"] = "%s possiede già %s",
+ ["gave_weapon_noweapon"] = "%s non ha quell' arma",
+ ["received_weapon"] = "Ricevuto %s da %s",
+ ["received_weapon_ammo"] = "Ricevuto ~o~%sx %s per il tuo %s da %s",
+ ["received_weapon_withammo"] = "Ricevuto %s con ~o~%sx %s per %s",
+ ["received_weapon_hasalready"] = "%s ha tentato di darti %s, ma hai già l'arma",
+ ["received_weapon_noweapon"] = "%s ha tentato di darti munizioni per %s, ma non hai l'arma",
+ ["gave_account_money"] = "Dando $%s (%s) a %s",
+ ["received_account_money"] = "Ricevuto $%s (%s) da %s",
+ ["amount_invalid"] = "Quantità non valida",
+ ["players_nearby"] = "Nessun giocatore vicino",
+ ["ex_inv_lim"] = "Non puoi farlo, eccedi il peso di %s",
+ ["imp_invalid_quantity"] = "Non puoi farlo, quantità non valida",
+ ["imp_invalid_amount"] = "Non puoi farlo, importo non valido",
+ ["threw_standard"] = "Gettando %sx %s",
+ ["threw_account"] = "Gettando $%s %s",
+ ["threw_weapon"] = "Gettando %s",
+ ["threw_weapon_ammo"] = "Gettando %s con ~o~%sx %s",
+ ["threw_weapon_already"] = "Hai gia quest' arma",
+ ["threw_cannot_pickup"] = "Inventario pieno, non puoi raccogliere!",
+ ["threw_pickup_prompt"] = "Premi E per raccogliere",
+ ["keymap_showinventory"] = "Apri inventario",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/nl.lua b/[core]/esx_inventory/locales/nl.lua
new file mode 100644
index 00000000..f646dc7f
--- /dev/null
+++ b/[core]/esx_inventory/locales/nl.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventaris ( Gewicht %s / %s )",
+ ["use"] = "Gebruik",
+ ["give"] = "Geef",
+ ["remove"] = "Gooi",
+ ["return"] = "Terug",
+ ["give_to"] = "Geef aan",
+ ["amount"] = "Aantal",
+ ["giveammo"] = "Geef munitie",
+ ["amountammo"] = "Hoeveelheid munitie",
+ ["noammo"] = "Niet genoeg munitie!",
+ ["gave_item"] = "%sx %s gegeven aan %s",
+ ["received_item"] = "%sx %s ontvangen van %s",
+ ["gave_weapon"] = "%s gegeven aan %s",
+ ["gave_weapon_ammo"] = "~o~%sx %s gegeven voor een %s aan %s",
+ ["gave_weapon_withammo"] = "%s gegeven met ~o~%sx %s aan %s",
+ ["gave_weapon_hasalready"] = "%s heeft al een %s",
+ ["gave_weapon_noweapon"] = "%s heeft dat wapen niet",
+ ["received_weapon"] = "%s ontvangen van %s",
+ ["received_weapon_ammo"] = "~o~%sx %s ontvangen voor je %s van %s",
+ ["received_weapon_withammo"] = "%s ontvangen met ~o~%sx %s van %s",
+ ["received_weapon_hasalready"] = "%s heeft geprobeerd je een %s te geven, maar je hebt dat wapen al.",
+ ["received_weapon_noweapon"] = "%s heeft geprobeerd je ammo te geven voor een %s, maar je hebt dit wapen niet",
+ ["gave_account_money"] = "€%s (%s) gegeven aan %s",
+ ["received_account_money"] = "€%s (%s) ontvangen van %s",
+ ["amount_invalid"] = "Ongeldige hoeveelheid",
+ ["players_nearby"] = "Geen spelers in de buurt",
+ ["ex_inv_lim"] = "Kan actie niet uitvoeren, overschrijdt max. gewicht van %s",
+ ["imp_invalid_quantity"] = "Kan actie niet uitvoeren, de hoeveelheid is ongeldig",
+ ["imp_invalid_amount"] = "Kan actie niet uitvoeren, het aantal is ongeldig",
+ ["threw_standard"] = "%sx %s weggegooid",
+ ["threw_account"] = "€%s %s weggegooid",
+ ["threw_weapon"] = "%s weggegooid",
+ ["threw_weapon_ammo"] = "%s met ~o~%sx %s weggegooid",
+ ["threw_weapon_already"] = "Je hebt dit wapen al !",
+ ["threw_cannot_pickup"] = "Inventaris is vol, je kan dit niet oppakken!",
+ ["threw_pickup_prompt"] = "Druk op E om op te pakken",
+ ["keymap_showinventory"] = "Laat inventaris zien",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/pl.lua b/[core]/esx_inventory/locales/pl.lua
new file mode 100644
index 00000000..d808c843
--- /dev/null
+++ b/[core]/esx_inventory/locales/pl.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "ekwipunek %s / %s",
+ ["use"] = "użyj",
+ ["give"] = "daj",
+ ["remove"] = "usuń",
+ ["return"] = "wróć",
+ ["give_to"] = "daj dla",
+ ["amount"] = "ilość",
+ ["giveammo"] = "daj amunicje",
+ ["amountammo"] = "ilość amunicji",
+ ["noammo"] = "nie posiadasz wystarczającej ilości amunicji!",
+ ["gave_item"] = "dałeś/aś %sx %s dla %s",
+ ["received_item"] = "otrzymałeś/aś %sx %s od %s",
+ ["gave_weapon"] = "dałeś/aś %s dla %s",
+ ["gave_weapon_ammo"] = "dałeś/aś ~o~%sx %s do %s dla %s",
+ ["gave_weapon_withammo"] = "dałeś/aś %s z ~o~%sx %s dla %s",
+ ["gave_weapon_hasalready"] = "%s już posiada %s",
+ ["gave_weapon_noweapon"] = "%s nie posiada tej broni",
+ ["received_weapon"] = "otrzymałeś/aś %s od %s",
+ ["received_weapon_ammo"] = "otrzymałeś/aś ~o~%sx %s do twojego %s od %s",
+ ["received_weapon_withammo"] = "otrzymałeś/aś %s z ~o~%sx %s od %s",
+ ["received_weapon_hasalready"] = "%s próbował/a przekazać ci %s, lecz już posiadasz jedno",
+ ["received_weapon_noweapon"] = "%s próbował/a przekazać ci amunicje do %s, lecz nie posiadasz tej broni",
+ ["gave_account_money"] = "dałeś/aś %s$ (%s) dla %s",
+ ["received_account_money"] = "otrzymałeś/aś %s$ (%s) od %s",
+ ["amount_invalid"] = "nieprawidłowa ilość",
+ ["players_nearby"] = "brak graczy w pobliżu",
+ ["ex_inv_lim"] = "akcja nie jest możliwa, nie możesz mieć więcej %s",
+ ["imp_invalid_quantity"] = "akcja jest niemożliwa, nieprawidłowa ilość",
+ ["imp_invalid_amount"] = "akcja jest niemożliwa, nieprawidłowa kwota",
+ ["threw_standard"] = "wyrzuciłeś/aś %sx %s",
+ ["threw_account"] = "wyrzuciłeś/aś $%s %s",
+ ["threw_weapon"] = "wyrzuciłeś/aś %s",
+ ["threw_weapon_ammo"] = "wyrzuciłeś/aś %s z ~o~%sx %s",
+ ["threw_weapon_already"] = "już posiadasz taką samą broń",
+ ["threw_cannot_pickup"] = "nie możesz tego podnieść, gdyż masz pełny ekwipunek!",
+ ["threw_pickup_prompt"] = "naciśnij E aby podnieść",
+ ["keymap_showinventory"] = "pokaż ekwipunek",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/sl.lua b/[core]/esx_inventory/locales/sl.lua
new file mode 100644
index 00000000..ee6a354c
--- /dev/null
+++ b/[core]/esx_inventory/locales/sl.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Shramba ( Teza %s / %s )",
+ ["use"] = "Uporabi",
+ ["give"] = "Daj",
+ ["remove"] = "Vrzi",
+ ["return"] = "Povratek",
+ ["give_to"] = "Daj",
+ ["amount"] = "Vsota",
+ ["giveammo"] = "Daj Strelivo",
+ ["amountammo"] = "Količina streliva",
+ ["noammo"] = "Ni dovolj!",
+ ["gave_item"] = "Dal si %sx %s k %s",
+ ["received_item"] = "Dobil si %sx %s od %s",
+ ["gave_weapon"] = "Dajanje %s do %s",
+ ["gave_weapon_ammo"] = "Dajanje ~o~%sx %s za %s do %s",
+ ["gave_weapon_withammo"] = "Dajanje %s z ~o~%sx %s do %s",
+ ["gave_weapon_hasalready"] = "%s ze ima %s",
+ ["gave_weapon_noweapon"] = "%s se nima tega orozja",
+ ["received_weapon"] = "Dobil si %s od %s",
+ ["received_weapon_ammo"] = "Dobil ~o~%sx %s za tvoj/o %s od %s",
+ ["received_weapon_withammo"] = "Dobil si %s z ~o~%sx %s od %s",
+ ["received_weapon_hasalready"] = "%s vam je poskušal dati %s, vendar že imate to orožje",
+ ["received_weapon_noweapon"] = "%s vam je poskušal dati strelivo za %s, vendar nimate tega orožja",
+ ["gave_account_money"] = "Dajanje $%s (%s) do %s",
+ ["received_account_money"] = "Dobil $%s (%s) od %s",
+ ["amount_invalid"] = "Neveljavna količina",
+ ["players_nearby"] = "V blizini ni ljudi",
+ ["ex_inv_lim"] = "Dejanja ni mogoče izvesti, saj presega največjo težo %s",
+ ["imp_invalid_quantity"] = "Dejanja ni mogoče izvesti, količina je neveljavna",
+ ["imp_invalid_amount"] = "Dejanja ni mogoče izvesti, znesek je neveljaven",
+ ["threw_standard"] = "Metanje %sx %s",
+ ["threw_account"] = "Metanje $%s %s",
+ ["threw_weapon"] = "Metanje %s",
+ ["threw_weapon_ammo"] = "Metanje %s z ~o~%sx %s",
+ ["threw_weapon_already"] = "Ti ze imas to orozje",
+ ["threw_cannot_pickup"] = "Shramba je poln, nemorem pobrati!",
+ ["threw_pickup_prompt"] = "Pritisni E da poberes",
+ ["keymap_showinventory"] = "Pokazi Shrambo",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/sr.lua b/[core]/esx_inventory/locales/sr.lua
new file mode 100644
index 00000000..f3675b2b
--- /dev/null
+++ b/[core]/esx_inventory/locales/sr.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventar ( Težina %s / %s )",
+ ["use"] = "Koristi",
+ ["give"] = "Daj",
+ ["remove"] = "Baci",
+ ["return"] = "Nazad",
+ ["give_to"] = "Daj",
+ ["amount"] = "Količina",
+ ["giveammo"] = "Daj municiju",
+ ["amountammo"] = "Količina municije",
+ ["noammo"] = "Nemate dovoljno!",
+ ["gave_item"] = "Davanje %sx %s igraču %s",
+ ["received_item"] = "Dobijeno %sx %s od %s",
+ ["gave_weapon"] = "Davanje %s igraču %s",
+ ["gave_weapon_ammo"] = "Davanje ~o~%sx %s za %s igraču %s",
+ ["gave_weapon_withammo"] = "Davanje %s sa ~o~%sx %s igraču %s",
+ ["gave_weapon_hasalready"] = "%s već ima %s",
+ ["gave_weapon_noweapon"] = "%s nema to oružje",
+ ["received_weapon"] = "Dobijeno %s od %s",
+ ["received_weapon_ammo"] = "Dobijeno ~o~%sx %s za vaš %s od %s",
+ ["received_weapon_withammo"] = "Dobijeno %s sa ~o~%sx %s od %s",
+ ["received_weapon_hasalready"] = "%s je pokušao da Vam da %s, ali vi već imate to oružje",
+ ["received_weapon_noweapon"] = "%s je pokušao da Vam da municiju za %s, ali vi nemate to oružje",
+ ["gave_account_money"] = "Davanje $%s (%s) igraču %s",
+ ["received_account_money"] = "Dobijeno $%s (%s) od %s",
+ ["amount_invalid"] = "Nevažeća količina",
+ ["players_nearby"] = "Nema igrača u blizini",
+ ["ex_inv_lim"] = "Ne možete uraditi to, premašuje max težinu od %s",
+ ["imp_invalid_quantity"] = "Nevažeća količina",
+ ["imp_invalid_amount"] = "Nevažeći iznos",
+ ["threw_standard"] = "Bacanje %sx %s",
+ ["threw_account"] = "Bacanje $%s %s",
+ ["threw_weapon"] = "Bacanje %s",
+ ["threw_weapon_ammo"] = "Bacanje %s sa ~o~%sx %s",
+ ["threw_weapon_already"] = "Vi već imate to oružje",
+ ["threw_cannot_pickup"] = "Inventar je pun, ne možete pokupiti to!",
+ ["threw_pickup_prompt"] = "Pritisni E da pokupiš",
+ ["keymap_showinventory"] = "Otvaranje inventara",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/sv.lua b/[core]/esx_inventory/locales/sv.lua
new file mode 100644
index 00000000..3e44d09b
--- /dev/null
+++ b/[core]/esx_inventory/locales/sv.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Inventory ( Vikt %s / %s )",
+ ["use"] = "Använd",
+ ["give"] = "Ge",
+ ["remove"] = "Kasta",
+ ["return"] = "Tillbaka",
+ ["give_to"] = "Ge",
+ ["amount"] = "Antal",
+ ["giveammo"] = "Ge skott",
+ ["amountammo"] = "Antal skott",
+ ["noammo"] = "Inte tillräckligt!",
+ ["gave_item"] = "Ger %sx %s till %s",
+ ["received_item"] = "Mottog %sx %s från %s",
+ ["gave_weapon"] = "Ger %s till %s",
+ ["gave_weapon_ammo"] = "Ger ~o~%sx %s för %s till %s",
+ ["gave_weapon_withammo"] = "Ger %s med ~o~%sx %s till %s",
+ ["gave_weapon_hasalready"] = "%s har redan en %s",
+ ["gave_weapon_noweapon"] = "%s har inte detta vapen",
+ ["received_weapon"] = "Mottog %s från %s",
+ ["received_weapon_ammo"] = "Mottog ~o~%sx %s för din %s från %s",
+ ["received_weapon_withammo"] = "Mottog %s med ~o~%sx %s från %s",
+ ["received_weapon_hasalready"] = "%s har försökt ge dig en %s, men du har redan detta",
+ ["received_weapon_noweapon"] = "%s har försökt ge dig skott till en %s, men du har inte detta vapen",
+ ["gave_account_money"] = "Ger %skr (%s) till %s",
+ ["received_account_money"] = "Mottog %skr (%s) från %s",
+ ["amount_invalid"] = "Ogiltig mängd",
+ ["players_nearby"] = "Inga spelare nära",
+ ["ex_inv_lim"] = "Kan inte utföra, överskrider maxvikten på %s",
+ ["imp_invalid_quantity"] = "Kan inte utföra, mängden är ogiltig",
+ ["imp_invalid_amount"] = "Kan inte utföra, antalet är ogiltig",
+ ["threw_standard"] = "Kastar %sx %s",
+ ["threw_account"] = "Kastar %skr %s",
+ ["threw_weapon"] = "Kastar %s",
+ ["threw_weapon_ammo"] = "Kastar %s med ~o~%sx %s",
+ ["threw_weapon_already"] = "Du har redan detta vapen",
+ ["threw_cannot_pickup"] = "Inventoryt är fullt, kan inte plocka upp!",
+ ["threw_pickup_prompt"] = "Tryck E för att plocka upp",
+ ["keymap_showinventory"] = "Öppna inventory",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/tr.lua b/[core]/esx_inventory/locales/tr.lua
new file mode 100644
index 00000000..bfe98dfd
--- /dev/null
+++ b/[core]/esx_inventory/locales/tr.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "Envanter ( Ağırlık %s / %s )",
+ ["use"] = "Kullan",
+ ["give"] = "Ver",
+ ["remove"] = "At",
+ ["return"] = "Geri Ver",
+ ["give_to"] = "Şuna Ver",
+ ["amount"] = "Miktar",
+ ["giveammo"] = "Mermi Ver",
+ ["amountammo"] = "Mermi Miktarı",
+ ["noammo"] = "Yeterli Değil!",
+ ["gave_item"] = "Verilen %sx %s %s'ye",
+ ["received_item"] = "Alınan %sx %s %s'den",
+ ["gave_weapon"] = "Verilen %s %s'ye",
+ ["gave_weapon_ammo"] = "Verilen ~o~%sx %s %s için %s'ye",
+ ["gave_weapon_withammo"] = "Verilen %s ile ~o~%sx %s %s'ye",
+ ["gave_weapon_hasalready"] = "%s Zaten Bir %s Sahip",
+ ["gave_weapon_noweapon"] = "%s O Silahı Sahip Değil",
+ ["received_weapon"] = "%s'den %s Alındı",
+ ["received_weapon_ammo"] = "%s'den %s için ~o~%sx %s Alındı",
+ ["received_weapon_withammo"] = "%s'den %s ile ~o~%sx %s Alındı",
+ ["received_weapon_hasalready"] = "%s Size Bir %s Vermeye Çalıştı, Ama Zaten Bu Silahınız Var",
+ ["received_weapon_noweapon"] = "%s Size Bir %s İçin Mermi Vermeye Çalıştı, Ama Bu Silaha Sahip Değilsiniz",
+ ["gave_account_money"] = "Verilen $%s (%s) %s'ye",
+ ["received_account_money"] = "Alınan $%s (%s) %s'den",
+ ["amount_invalid"] = "Geçersiz Miktar",
+ ["players_nearby"] = "Yakınlarda Hiçbir Oyuncu Yok",
+ ["ex_inv_lim"] = "İşlem Yapılamaz, %s Ağırlık Sınırı Aşıldı",
+ ["imp_invalid_quantity"] = "İşlem Yapılamaz, Miktar Geçersiz",
+ ["imp_invalid_amount"] = "İşlem Yapılamaz, Miktar Geçersiz",
+ ["threw_standard"] = "Atılan %sx %s",
+ ["threw_account"] = "Atılan $%s %s",
+ ["threw_weapon"] = "Atılan %s",
+ ["threw_weapon_ammo"] = "Atılan %s ile ~o~%sx %s",
+ ["threw_weapon_already"] = "Bu Silaha Zaten Sahipsiniz",
+ ["threw_cannot_pickup"] = "Envanter Dolu, Alınamaz!",
+ ["threw_pickup_prompt"] = "Almak İçin E'ye Basın",
+ ["keymap_showinventory"] = "Envanteri Göster",
+ ["locale_currency"] = "$%s",
+}
diff --git a/[core]/esx_inventory/locales/zh-cn.lua b/[core]/esx_inventory/locales/zh-cn.lua
new file mode 100644
index 00000000..aec0afe1
--- /dev/null
+++ b/[core]/esx_inventory/locales/zh-cn.lua
@@ -0,0 +1,40 @@
+return {
+ ["inventory"] = "物品栏 (负重 %s / %s)",
+ ["use"] = "使用",
+ ["give"] = "赠予",
+ ["remove"] = "丢弃",
+ ["return"] = "返回",
+ ["give_to"] = "赠予目标",
+ ["amount"] = "数量",
+ ["giveammo"] = "赠予弹药",
+ ["amountammo"] = "弹药数量",
+ ["noammo"] = "弹药不足!",
+ ["gave_item"] = "您将 %s 个 %s 赠予给 %s",
+ ["received_item"] = "您收到 %s 个 %s, 由 %s 的赠予",
+ ["gave_weapon"] = "您将 %s 赠予给 %s",
+ ["gave_weapon_ammo"] = "您将 ~o~%s 发 %s %s 赠予 %s",
+ ["gave_weapon_withammo"] = "您把 %s 及 ~o~%s 发 %s 赠予 %s",
+ ["gave_weapon_hasalready"] = "%s 已拥有 %s",
+ ["gave_weapon_noweapon"] = "%s 未拥有该武器",
+ ["received_weapon"] = "您收到 %s, 由 %s 赠",
+ ["received_weapon_ammo"] = "您收到 ~o~%s 发 %s 的%s, 由 %s 赠予",
+ ["received_weapon_withammo"] = "您收到 %s 及 ~o~%s 发 %s, 由 %s 赠予",
+ ["received_weapon_hasalready"] = "%s 试图赠予您 %s, 但您已拥有",
+ ["received_weapon_noweapon"] = "%s 试图赠予您 %s 发弹药, 但您未装备该武器",
+ ["gave_account_money"] = "您将 ¥%s (%s) 转账至 %s",
+ ["received_account_money"] = "您收到 ¥%s (%s), 由 %s 转账",
+ ["amount_invalid"] = "无效数量",
+ ["players_nearby"] = "附近暂无其他人员",
+ ["ex_inv_lim"] = "操作失败: 超过最大负重限制 (%s)",
+ ["imp_invalid_quantity"] = "操作失败: 无效数量输入",
+ ["imp_invalid_amount"] = "操作失败: 无效金额输入",
+ ["threw_standard"] = "您已丢弃 %s 个 %s",
+ ["threw_account"] = "您已丢弃 ¥%s 笔 %s",
+ ["threw_weapon"] = "您已丢弃武器 %s",
+ ["threw_weapon_ammo"] = "您已丢弃 %s 及其 ~o~%s 发 %s",
+ ["threw_weapon_already"] = "您已持有相同武器!",
+ ["threw_cannot_pickup"] = "物品栏已满, 无法拾取!",
+ ["threw_pickup_prompt"] = "键下 [E] 拾取",
+ ["keymap_showinventory"] = "显示物品栏",
+ ["locale_currency"] = "$%s",
+}
From 1b9389417b1c3ba9187ce166de8904789fe5d042 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Tue, 12 Aug 2025 19:34:01 +0200
Subject: [PATCH 06/30] fix(esx_inventory/config/main): auto-detect locale
---
[core]/esx_inventory/config/main.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/[core]/esx_inventory/config/main.lua b/[core]/esx_inventory/config/main.lua
index 597c5160..2b9a476e 100644
--- a/[core]/esx_inventory/config/main.lua
+++ b/[core]/esx_inventory/config/main.lua
@@ -1,3 +1,3 @@
Config = {
- Locale = "en",
+ Locale = GetConvar("esx:locale", "en"),
}
From a36414c01ee79cdcd7e1d2db3c34f37fd892bfec Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Tue, 12 Aug 2025 19:36:49 +0200
Subject: [PATCH 07/30] Remove server_scripts entry from fxmanifest.lua
---
[core]/esx_inventory/fxmanifest.lua | 4 ----
1 file changed, 4 deletions(-)
diff --git a/[core]/esx_inventory/fxmanifest.lua b/[core]/esx_inventory/fxmanifest.lua
index 3b1ea9ad..e1a79d50 100644
--- a/[core]/esx_inventory/fxmanifest.lua
+++ b/[core]/esx_inventory/fxmanifest.lua
@@ -15,10 +15,6 @@ client_scripts {
"/client/main.lua",
}
-server_scripts {
- "/server/main.lua",
-}
-
files {
"/locales/*.lua"
}
From 5a596e5fadca090218bfbfc2cd8b00aaa8249259 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Tue, 12 Aug 2025 19:39:39 +0200
Subject: [PATCH 08/30] fix(esx_inventory/client/main): use playerdata
maxweight
---
[core]/esx_inventory/client/main.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/[core]/esx_inventory/client/main.lua b/[core]/esx_inventory/client/main.lua
index 66577af5..14788c6d 100644
--- a/[core]/esx_inventory/client/main.lua
+++ b/[core]/esx_inventory/client/main.lua
@@ -179,7 +179,7 @@ local function showInventory()
ESX.PlayerData = ESX.GetPlayerData()
local elements, totalWeight = buildInventoryElements()
ESX.UI.Menu.Open("default", ESX.currentResourceName, "esx_inventory_main", {
- title = TranslateCap("inventory", totalWeight, ESX.GetConfig("MaxWeight")),
+ title = TranslateCap("inventory", totalWeight, ESX.PlayerData.maxWeight),
elements = elements,
}, function(data, menu)
local selected = data.current --[[@as InventoryElement]]
From 43e4c11426682e0bdda008dd815fefeca591254d Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Tue, 12 Aug 2025 21:25:12 +0200
Subject: [PATCH 09/30] refactor(esx_inventory/client/main): promise based
quantity dialog
---
[core]/esx_inventory/client/main.lua | 36 ++++++++++++++++------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/[core]/esx_inventory/client/main.lua b/[core]/esx_inventory/client/main.lua
index 14788c6d..026fad3e 100644
--- a/[core]/esx_inventory/client/main.lua
+++ b/[core]/esx_inventory/client/main.lua
@@ -133,19 +133,26 @@ end
---@param title string
---@param maxCount number
----@param cb function
-local function openQuantityDialog(title, maxCount, cb)
- ESX.UI.Menu.Open("dialog", ESX.currentResourceName, "esx_quantity_dialog", {
+---@return number?
+local function openQuantityDialog(title, maxCount)
+ local p = promise:new()
+ ESX.UI.Menu.Open("dialog", ESX.currentResourceName, "esx_inventory_quantity", {
title = title
}, function(data, menu)
local qty = tonumber(data.value)
if not qty or qty <= 0 or qty > maxCount then
ESX.ShowNotification(TranslateCap("amount_invalid"))
+ p:resolve(nil)
else
menu.close()
- cb(qty)
+ p:resolve(qty)
end
- end, function(_, menu) menu.close() end)
+ end, function(_, menu)
+ menu.close()
+ p:resolve(nil)
+ end)
+
+ return Citizen.Await(p)
end
---@param action InventoryAction
@@ -154,20 +161,19 @@ end
local function handleInventoryAction(action, selected, closestPlayer)
local itemType, itemName, playerPed = selected.type, selected.value, ESX.PlayerData.ped
if action == "give" then
- openQuantityDialog(TranslateCap("amount"), selected.count, function(qty)
- TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), itemType, itemName, qty)
- end)
+ local qty = openQuantityDialog(TranslateCap("amount"), selected.count)
+ if not qty then return end
+ TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), itemType, itemName, qty)
elseif action == "remove" then
- openQuantityDialog(TranslateCap("amount"), selected.count, function(qty)
- TriggerServerEvent("esx:removeInventoryItem", itemType, itemName, qty)
- end)
+ local qty = openQuantityDialog(TranslateCap("amount"), selected.count)
+ if not qty then return end
+ TriggerServerEvent("esx:removeInventoryItem", itemType, itemName, qty)
elseif action == "use" then
TriggerServerEvent("esx:useItem", itemName)
elseif action == "give_ammo" then
local pedAmmo = GetAmmoInPedWeapon(playerPed, joaat(itemName))
- openQuantityDialog(TranslateCap("amount"), pedAmmo, function(qty)
- TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), "item_ammo", itemName, qty)
- end)
+ local qty = openQuantityDialog(TranslateCap("amount"), pedAmmo)
+ TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), "item_ammo", itemName, qty)
end
end
@@ -212,7 +218,7 @@ end)
local function refreshInventory()
if not ESX.UI.Menu.IsOpen("default", ESX.currentResourceName, "esx_inventory_main") and
not ESX.UI.Menu.IsOpen("default", ESX.currentResourceName, "esx_inventory_actions") and
- not ESX.UI.Menu.IsOpen("dialog", ESX.currentResourceName, "esx_quantity_dialog") then
+ not ESX.UI.Menu.IsOpen("dialog", ESX.currentResourceName, "esx_inventory_quantity") then
return
end
Citizen.Wait(0)
From b291c5fd42605379a132864fcfff727929244140 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Tue, 12 Aug 2025 21:33:08 +0200
Subject: [PATCH 10/30] refactor(esx_inventory/client/main): implement
requested changes
---
[core]/esx_inventory/client/main.lua | 57 +++++++++++++++-------------
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/[core]/esx_inventory/client/main.lua b/[core]/esx_inventory/client/main.lua
index 026fad3e..c9bb585c 100644
--- a/[core]/esx_inventory/client/main.lua
+++ b/[core]/esx_inventory/client/main.lua
@@ -46,21 +46,23 @@ end
---@return number
local function appendItems(elements)
local weight = 0
- for _, v in ipairs(ESX.PlayerData.inventory) do
- if v.count > 0 then
- weight = weight + (v.weight * v.count)
+ for i = 1, #ESX.PlayerData.inventory do
+ local item = ESX.PlayerData.inventory[i]
+ if item.count > 0 then
+ weight = weight + (item.weight * item.count)
elements[#elements + 1] = {
type = "item_standard",
- label = ("%s x%s"):format(v.label, v.count),
+ label = ("%s x%s"):format(item.label, item.count),
icon = "fas fa-box",
- count = v.count,
- value = v.name,
- usable = v.usable,
- rare = v.rare,
- canRemove = v.canRemove
+ count = item.count,
+ value = item.name,
+ usable = item.usable,
+ rare = item.rare,
+ canRemove = item.canRemove
}
end
end
+
return weight
end
@@ -68,25 +70,27 @@ end
---@return number
local function appendLoadout(elements)
local weight = 0
- for _, weapon in ipairs(ESX.GetConfig("Weapons")) do
+ local playerPed = ESX.PlayerData.ped
+
+ for i = 1, #ESX.PlayerData.loadout do
+ local weapon = ESX.PlayerData.loadout[i]
local weaponHash = joaat(weapon.name)
- if HasPedGotWeapon(ESX.PlayerData.ped, weaponHash, false) then
- local ammo = GetAmmoInPedWeapon(ESX.PlayerData.ped, weaponHash)
- local label = weapon.ammo and ("%s - %s %s"):format(weapon.label, ammo, weapon.ammo.label) or weapon.label
- elements[#elements + 1] = {
- type = "item_weapon",
- label = label,
- icon = "fas fa-gun",
- count = 1,
- value = weapon.name,
- usable = false,
- rare = false,
- ammo = ammo,
- canGiveAmmo = (weapon.ammo ~= nil),
- canRemove = true
- }
- end
+ local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
+ local label = weapon.ammo and ("%s - %s %s"):format(weapon.label, ammo, weapon.ammo.label) or weapon.label
+ elements[#elements + 1] = {
+ type = "item_weapon",
+ label = label,
+ icon = "fas fa-gun",
+ count = 1,
+ value = weapon.name,
+ usable = false,
+ rare = false,
+ ammo = ammo,
+ canGiveAmmo = (weapon.ammo ~= nil),
+ canRemove = true
+ }
end
+
return weight
end
@@ -173,6 +177,7 @@ local function handleInventoryAction(action, selected, closestPlayer)
elseif action == "give_ammo" then
local pedAmmo = GetAmmoInPedWeapon(playerPed, joaat(itemName))
local qty = openQuantityDialog(TranslateCap("amount"), pedAmmo)
+ if not qty then return end
TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), "item_ammo", itemName, qty)
end
end
From ea87215a62a25f97dab337993a1f95f2a64d3b41 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Tue, 12 Aug 2025 21:35:23 +0200
Subject: [PATCH 11/30] esx_inventory: enable oal
---
[core]/esx_inventory/fxmanifest.lua | 1 +
1 file changed, 1 insertion(+)
diff --git a/[core]/esx_inventory/fxmanifest.lua b/[core]/esx_inventory/fxmanifest.lua
index e1a79d50..e12aef1a 100644
--- a/[core]/esx_inventory/fxmanifest.lua
+++ b/[core]/esx_inventory/fxmanifest.lua
@@ -3,6 +3,7 @@ fx_version "cerulean"
game "gta5"
description "Inventory for the ESX framework"
lua54 "yes"
+use_fxv2_oal "yes"
version "1.13.1"
shared_scripts {
From 524484abb65b1d7c17ea9ff5eb60cf528461b50c Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Wed, 13 Aug 2025 12:38:23 +0200
Subject: [PATCH 12/30] fix(esx_inventory): fix loadout append
---
[core]/esx_inventory/client/main.lua | 2 +-
[core]/esx_inventory/locales/cs.lua | 1 +
[core]/esx_inventory/locales/de.lua | 1 +
[core]/esx_inventory/locales/el.lua | 1 +
[core]/esx_inventory/locales/en.lua | 1 +
[core]/esx_inventory/locales/es.lua | 1 +
[core]/esx_inventory/locales/fi.lua | 1 +
[core]/esx_inventory/locales/fr.lua | 1 +
[core]/esx_inventory/locales/he.lua | 1 +
[core]/esx_inventory/locales/hu.lua | 1 +
[core]/esx_inventory/locales/id.lua | 1 +
[core]/esx_inventory/locales/it.lua | 1 +
[core]/esx_inventory/locales/nl.lua | 1 +
[core]/esx_inventory/locales/pl.lua | 1 +
[core]/esx_inventory/locales/sl.lua | 1 +
[core]/esx_inventory/locales/sr.lua | 1 +
[core]/esx_inventory/locales/sv.lua | 1 +
[core]/esx_inventory/locales/tr.lua | 1 +
[core]/esx_inventory/locales/zh-cn.lua | 1 +
19 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/[core]/esx_inventory/client/main.lua b/[core]/esx_inventory/client/main.lua
index c9bb585c..910101e4 100644
--- a/[core]/esx_inventory/client/main.lua
+++ b/[core]/esx_inventory/client/main.lua
@@ -76,7 +76,7 @@ local function appendLoadout(elements)
local weapon = ESX.PlayerData.loadout[i]
local weaponHash = joaat(weapon.name)
local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
- local label = weapon.ammo and ("%s - %s %s"):format(weapon.label, ammo, weapon.ammo.label) or weapon.label
+ local label = weapon.ammo and ("%s - %s %s"):format(weapon.label, weapon.ammo, TranslateCap("ammo_rounds")) or weapon.label
elements[#elements + 1] = {
type = "item_weapon",
label = label,
diff --git a/[core]/esx_inventory/locales/cs.lua b/[core]/esx_inventory/locales/cs.lua
index aeffb4c7..039e8ec3 100644
--- a/[core]/esx_inventory/locales/cs.lua
+++ b/[core]/esx_inventory/locales/cs.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Zmáčkni E pro sebrání!",
["keymap_showinventory"] = "Otevřít inventář",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/de.lua b/[core]/esx_inventory/locales/de.lua
index 0f8218c8..ae90a16f 100644
--- a/[core]/esx_inventory/locales/de.lua
+++ b/[core]/esx_inventory/locales/de.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Drücke [E] zum aufheben",
["keymap_showinventory"] = "Inventar Anzeigen",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/el.lua b/[core]/esx_inventory/locales/el.lua
index ea62899e..75acbc5b 100644
--- a/[core]/esx_inventory/locales/el.lua
+++ b/[core]/esx_inventory/locales/el.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Πατήστε E για να σηκώσετε",
["keymap_showinventory"] = "Εμφάνιση Αποθήκης",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/en.lua b/[core]/esx_inventory/locales/en.lua
index ba7bffce..926fd4bb 100644
--- a/[core]/esx_inventory/locales/en.lua
+++ b/[core]/esx_inventory/locales/en.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Press E to Pickup",
["keymap_showinventory"] = "Show Inventory",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/es.lua b/[core]/esx_inventory/locales/es.lua
index 9e529a90..f0e451fd 100644
--- a/[core]/esx_inventory/locales/es.lua
+++ b/[core]/esx_inventory/locales/es.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Pulsa E para recoger",
["keymap_showinventory"] = "Mostrar inventario",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/fi.lua b/[core]/esx_inventory/locales/fi.lua
index 5c30439d..2f2b85a4 100644
--- a/[core]/esx_inventory/locales/fi.lua
+++ b/[core]/esx_inventory/locales/fi.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Paina E kerätäksesi",
["keymap_showinventory"] = "Avaa reppu",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/fr.lua b/[core]/esx_inventory/locales/fr.lua
index 78f7ceac..a267274f 100644
--- a/[core]/esx_inventory/locales/fr.lua
+++ b/[core]/esx_inventory/locales/fr.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Appuyez sur E pour ramasser",
["keymap_showinventory"] = "Afficher l'inventaire",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/he.lua b/[core]/esx_inventory/locales/he.lua
index 3d62c0b3..cfa2206d 100644
--- a/[core]/esx_inventory/locales/he.lua
+++ b/[core]/esx_inventory/locales/he.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "לחץ E כדי לאסוף",
["keymap_showinventory"] = "הצג מלאי",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/hu.lua b/[core]/esx_inventory/locales/hu.lua
index 64338675..8b439837 100644
--- a/[core]/esx_inventory/locales/hu.lua
+++ b/[core]/esx_inventory/locales/hu.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "E hogy felvedd",
["keymap_showinventory"] = "Leltár mutatása",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/id.lua b/[core]/esx_inventory/locales/id.lua
index 941119ab..17e81820 100644
--- a/[core]/esx_inventory/locales/id.lua
+++ b/[core]/esx_inventory/locales/id.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Tekan E untuk Mengambil",
["keymap_showinventory"] = "Buka Inventaris",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/it.lua b/[core]/esx_inventory/locales/it.lua
index e8f44d4b..fed46c28 100644
--- a/[core]/esx_inventory/locales/it.lua
+++ b/[core]/esx_inventory/locales/it.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Premi E per raccogliere",
["keymap_showinventory"] = "Apri inventario",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/nl.lua b/[core]/esx_inventory/locales/nl.lua
index f646dc7f..dfc9e764 100644
--- a/[core]/esx_inventory/locales/nl.lua
+++ b/[core]/esx_inventory/locales/nl.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Druk op E om op te pakken",
["keymap_showinventory"] = "Laat inventaris zien",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/pl.lua b/[core]/esx_inventory/locales/pl.lua
index d808c843..be0ec276 100644
--- a/[core]/esx_inventory/locales/pl.lua
+++ b/[core]/esx_inventory/locales/pl.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "naciśnij E aby podnieść",
["keymap_showinventory"] = "pokaż ekwipunek",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/sl.lua b/[core]/esx_inventory/locales/sl.lua
index ee6a354c..360c6648 100644
--- a/[core]/esx_inventory/locales/sl.lua
+++ b/[core]/esx_inventory/locales/sl.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Pritisni E da poberes",
["keymap_showinventory"] = "Pokazi Shrambo",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/sr.lua b/[core]/esx_inventory/locales/sr.lua
index f3675b2b..b2f9e956 100644
--- a/[core]/esx_inventory/locales/sr.lua
+++ b/[core]/esx_inventory/locales/sr.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Pritisni E da pokupiš",
["keymap_showinventory"] = "Otvaranje inventara",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/sv.lua b/[core]/esx_inventory/locales/sv.lua
index 3e44d09b..4a124b59 100644
--- a/[core]/esx_inventory/locales/sv.lua
+++ b/[core]/esx_inventory/locales/sv.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Tryck E för att plocka upp",
["keymap_showinventory"] = "Öppna inventory",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/tr.lua b/[core]/esx_inventory/locales/tr.lua
index bfe98dfd..35df1f3b 100644
--- a/[core]/esx_inventory/locales/tr.lua
+++ b/[core]/esx_inventory/locales/tr.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "Almak İçin E'ye Basın",
["keymap_showinventory"] = "Envanteri Göster",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
diff --git a/[core]/esx_inventory/locales/zh-cn.lua b/[core]/esx_inventory/locales/zh-cn.lua
index aec0afe1..be7d200c 100644
--- a/[core]/esx_inventory/locales/zh-cn.lua
+++ b/[core]/esx_inventory/locales/zh-cn.lua
@@ -37,4 +37,5 @@ return {
["threw_pickup_prompt"] = "键下 [E] 拾取",
["keymap_showinventory"] = "显示物品栏",
["locale_currency"] = "$%s",
+ ["ammo_rounds"] = "Rounds"
}
From 216f64848226c03d9d49cffde9f022c7308d619d Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Wed, 13 Aug 2025 13:46:44 +0200
Subject: [PATCH 13/30] feat: sync player data inv & loadout
---
[core]/es_extended/client/modules/events.lua | 19 ++++++++++
[core]/es_extended/imports.lua | 39 ++++++++++++++++++++
[core]/es_extended/server/classes/player.lua | 2 +
3 files changed, 60 insertions(+)
diff --git a/[core]/es_extended/client/modules/events.lua b/[core]/es_extended/client/modules/events.lua
index 764a897a..a44239bd 100644
--- a/[core]/es_extended/client/modules/events.lua
+++ b/[core]/es_extended/client/modules/events.lua
@@ -196,6 +196,25 @@ if not Config.CustomInventory then
end
end)
+ ESX.SecureNetEvent("esx:addLoadoutItem", function(weaponName, weaponLabel, ammo)
+ table.insert(ESX.PlayerData.loadout, {
+ name = weaponName,
+ ammo = ammo,
+ label = weaponLabel,
+ components = {},
+ tintIndex = 0,
+ })
+ end)
+
+ ESX.SecureNetEvent("esx:removeLoadoutItem", function(weaponName, weaponLabel)
+ for i = 1, #ESX.PlayerData.loadout do
+ if ESX.PlayerData.loadout[i].name == weaponName then
+ table.remove(ESX.PlayerData.loadout, i)
+ break
+ end
+ end
+ end)
+
RegisterNetEvent("esx:addWeapon", function()
error("event ^5'esx:addWeapon'^1 Has Been Removed. Please use ^5xPlayer.addWeapon^1 Instead!")
end)
diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua
index 3ea31a3b..edd5ec8a 100644
--- a/[core]/es_extended/imports.lua
+++ b/[core]/es_extended/imports.lua
@@ -48,6 +48,45 @@ if not IsDuplicityVersion() then -- Only register this event for the client
ESX.PlayerData = {}
end)
+ if not ESX.GetConfig("CustomInventory") then
+ ESX.SecureNetEvent("esx:addInventoryItem", function(item, count, showNotification)
+ for k, v in ipairs(ESX.PlayerData.inventory) do
+ if v.name == item then
+ ESX.PlayerData.inventory[k].count = count
+ break
+ end
+ end
+ end)
+
+ ESX.SecureNetEvent("esx:removeInventoryItem", function(item, count, showNotification)
+ for i = 1, #ESX.PlayerData.inventory do
+ if ESX.PlayerData.inventory[i].name == item then
+ ESX.PlayerData.inventory[i].count = count
+ break
+ end
+ end
+ end)
+
+ ESX.SecureNetEvent("esx:addLoadoutItem", function(weaponName, weaponLabel, ammo)
+ table.insert(ESX.PlayerData.loadout, {
+ name = weaponName,
+ ammo = ammo,
+ label = weaponLabel,
+ components = {},
+ tintIndex = 0,
+ })
+ end)
+
+ ESX.SecureNetEvent("esx:removeLoadoutItem", function(weaponName, weaponLabel)
+ for i = 1, #ESX.PlayerData.loadout do
+ if ESX.PlayerData.loadout[i].name == weaponName then
+ table.remove(ESX.PlayerData.loadout, i)
+ break
+ end
+ end
+ end)
+ end
+
local external = { { "Class", "class.lua" }, { "Point", "point.lua" } }
for i = 1, #external do
local module = external[i]
diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua
index df1d1ee5..fb02f3aa 100644
--- a/[core]/es_extended/server/classes/player.lua
+++ b/[core]/es_extended/server/classes/player.lua
@@ -580,6 +580,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
GiveWeaponToPed(GetPlayerPed(self.source), joaat(weaponName), ammo, false, false)
self.triggerEvent("esx:addInventoryItem", weaponLabel, false, true)
+ self.triggerEvent("esx:addLoadoutItem", weaponName, weaponLabel, ammo)
end
end
@@ -692,6 +693,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
if weaponLabel then
self.triggerEvent("esx:removeInventoryItem", weaponLabel, false, true)
+ self.triggerEvent("esx:removeLoadoutItem", weaponName, weaponLabel)
end
end
From 28670480bc897f8e043e7cee5875f05ec75a7b36 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Wed, 13 Aug 2025 15:00:39 +0200
Subject: [PATCH 14/30] fix(es_extended/shared/functions): fix ESX.GetConfig
bug
---
[core]/es_extended/shared/functions.lua | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/[core]/es_extended/shared/functions.lua b/[core]/es_extended/shared/functions.lua
index 4b84d33c..8c39e2f5 100644
--- a/[core]/es_extended/shared/functions.lua
+++ b/[core]/es_extended/shared/functions.lua
@@ -31,7 +31,11 @@ end
---@param key? string Key pair to get specific value of config
---@return unknown Returns the whole config if no key is passed, or a specific value
function ESX.GetConfig(key)
- return key and Config[key] or Config
+ if key then
+ return Config[key]
+ end
+
+ return Config
end
---@param weaponName string
From f8c59020b791648682385c8281d6249f26d22f20 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Wed, 13 Aug 2025 15:13:46 +0200
Subject: [PATCH 15/30] refactor(esx_inventory/client/main): GetPlayerData no
longer needed
---
[core]/esx_inventory/client/main.lua | 1 -
1 file changed, 1 deletion(-)
diff --git a/[core]/esx_inventory/client/main.lua b/[core]/esx_inventory/client/main.lua
index 910101e4..80b4fd4a 100644
--- a/[core]/esx_inventory/client/main.lua
+++ b/[core]/esx_inventory/client/main.lua
@@ -187,7 +187,6 @@ end
----------------------
local function showInventory()
- ESX.PlayerData = ESX.GetPlayerData()
local elements, totalWeight = buildInventoryElements()
ESX.UI.Menu.Open("default", ESX.currentResourceName, "esx_inventory_main", {
title = TranslateCap("inventory", totalWeight, ESX.PlayerData.maxWeight),
From 4efcc56a9be601c918f20df11eff0428a32b557c Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Wed, 13 Aug 2025 17:26:16 +0200
Subject: [PATCH 16/30] refactor(es_extended/imports): implement requested
changes
---
[core]/es_extended/imports.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua
index edd5ec8a..0fd7f748 100644
--- a/[core]/es_extended/imports.lua
+++ b/[core]/es_extended/imports.lua
@@ -50,9 +50,9 @@ if not IsDuplicityVersion() then -- Only register this event for the client
if not ESX.GetConfig("CustomInventory") then
ESX.SecureNetEvent("esx:addInventoryItem", function(item, count, showNotification)
- for k, v in ipairs(ESX.PlayerData.inventory) do
- if v.name == item then
- ESX.PlayerData.inventory[k].count = count
+ for i = 1, #ESX.PlayerData.inventory do
+ if ESX.PlayerData.inventory[i].name == item then
+ ESX.PlayerData.inventory[i].count = count
break
end
end
From 224d06fad266e5fcf24e9336af5aba1c75bfcee9 Mon Sep 17 00:00:00 2001
From: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 13 Aug 2025 15:34:40 +0000
Subject: [PATCH 17/30] chore: bump manifest version to 1.13.2
---
[core]/cron/fxmanifest.lua | 2 +-
[core]/es_extended/fxmanifest.lua | 2 +-
[core]/esx_chat_theme/fxmanifest.lua | 2 +-
[core]/esx_context/fxmanifest.lua | 2 +-
[core]/esx_identity/fxmanifest.lua | 2 +-
[core]/esx_inventory/fxmanifest.lua | 2 +-
[core]/esx_loadingscreen/fxmanifest.lua | 2 +-
[core]/esx_menu_default/fxmanifest.lua | 2 +-
[core]/esx_menu_dialog/fxmanifest.lua | 2 +-
[core]/esx_menu_list/fxmanifest.lua | 2 +-
[core]/esx_multicharacter/fxmanifest.lua | 2 +-
[core]/esx_notify/fxmanifest.lua | 2 +-
[core]/esx_progressbar/fxmanifest.lua | 2 +-
[core]/esx_skin/fxmanifest.lua | 2 +-
[core]/esx_textui/fxmanifest.lua | 2 +-
[core]/skinchanger/fxmanifest.lua | 2 +-
16 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/[core]/cron/fxmanifest.lua b/[core]/cron/fxmanifest.lua
index 716eb5ab..85fa877a 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.13.1'
+version '1.13.2'
server_script 'server/main.lua'
diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua
index f57a9dc3..74545f8d 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.13.1'
+version '1.13.2'
shared_scripts {
'locale.lua',
diff --git a/[core]/esx_chat_theme/fxmanifest.lua b/[core]/esx_chat_theme/fxmanifest.lua
index 91e3661a..c12d3c9b 100644
--- a/[core]/esx_chat_theme/fxmanifest.lua
+++ b/[core]/esx_chat_theme/fxmanifest.lua
@@ -1,4 +1,4 @@
-version '1.13.1'
+version '1.13.2'
author 'ESX-Framework'
description 'A ESX Stylised theme for the chat resource.'
diff --git a/[core]/esx_context/fxmanifest.lua b/[core]/esx_context/fxmanifest.lua
index 2a7ba89d..b6668179 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.13.1'
+version '1.13.2'
ui_page 'index.html'
diff --git a/[core]/esx_identity/fxmanifest.lua b/[core]/esx_identity/fxmanifest.lua
index 3e937205..c26e72af 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.13.1'
+version '1.13.2'
shared_scripts {
'@es_extended/imports.lua',
diff --git a/[core]/esx_inventory/fxmanifest.lua b/[core]/esx_inventory/fxmanifest.lua
index e12aef1a..87a97468 100644
--- a/[core]/esx_inventory/fxmanifest.lua
+++ b/[core]/esx_inventory/fxmanifest.lua
@@ -4,7 +4,7 @@ game "gta5"
description "Inventory for the ESX framework"
lua54 "yes"
use_fxv2_oal "yes"
-version "1.13.1"
+version '1.13.2'
shared_scripts {
"/config/main.lua",
diff --git a/[core]/esx_loadingscreen/fxmanifest.lua b/[core]/esx_loadingscreen/fxmanifest.lua
index 65dfa65e..cb6cad11 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.13.1'
+version '1.13.2'
lua54 'yes'
loadscreen 'index.html'
diff --git a/[core]/esx_menu_default/fxmanifest.lua b/[core]/esx_menu_default/fxmanifest.lua
index 73307a63..133a08f6 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.13.1'
+version '1.13.2'
client_scripts { '@es_extended/imports.lua', 'client/main.lua' }
diff --git a/[core]/esx_menu_dialog/fxmanifest.lua b/[core]/esx_menu_dialog/fxmanifest.lua
index fa69eff0..182c6f81 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.13.1'
+version '1.13.2'
client_scripts {
'@es_extended/imports.lua',
diff --git a/[core]/esx_menu_list/fxmanifest.lua b/[core]/esx_menu_list/fxmanifest.lua
index 43ace6e1..edd0b0c2 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.13.1'
+version '1.13.2'
client_scripts {
diff --git a/[core]/esx_multicharacter/fxmanifest.lua b/[core]/esx_multicharacter/fxmanifest.lua
index d4e887d3..26cbc8e1 100644
--- a/[core]/esx_multicharacter/fxmanifest.lua
+++ b/[core]/esx_multicharacter/fxmanifest.lua
@@ -2,7 +2,7 @@ fx_version 'cerulean'
game 'gta5'
author 'ESX-Framework - Linden - KASH'
description 'Allows players to have multiple characters on the same account.'
-version '1.13.1'
+version '1.13.2'
lua54 'yes'
dependencies { 'es_extended', 'esx_context', 'esx_identity', 'esx_skin' }
diff --git a/[core]/esx_notify/fxmanifest.lua b/[core]/esx_notify/fxmanifest.lua
index 30f0ed5c..41325249 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.13.1'
+version '1.13.2'
author 'ESX-Framework'
description 'A beautiful and simple NUI notification system for ESX'
diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[core]/esx_progressbar/fxmanifest.lua
index 4a84428c..d3e2020f 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.13.1'
+version '1.13.2'
lua54 'yes'
client_scripts { 'Progress.lua' }
diff --git a/[core]/esx_skin/fxmanifest.lua b/[core]/esx_skin/fxmanifest.lua
index 9a397528..a44bf801 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.13.1'
+version '1.13.2'
lua54 'yes'
shared_scripts {
diff --git a/[core]/esx_textui/fxmanifest.lua b/[core]/esx_textui/fxmanifest.lua
index 9858605e..857ec2ef 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.13.1'
+version '1.13.2'
lua54 'yes'
client_scripts { 'TextUI.lua' }
diff --git a/[core]/skinchanger/fxmanifest.lua b/[core]/skinchanger/fxmanifest.lua
index 7b2b6707..b5e3e957 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.13.1'
+version '1.13.2'
lua54 'yes'
client_scripts {
From ab4dc91eb84887dce6fb7a017331c709756f4e59 Mon Sep 17 00:00:00 2001
From: Rafael Antunes <147253092+Fellow1990@users.noreply.github.com>
Date: Thu, 14 Aug 2025 18:58:42 +0100
Subject: [PATCH 18/30] use static player methods
ESX Identity
---
[core]/esx_identity/server/main.lua | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/[core]/esx_identity/server/main.lua b/[core]/esx_identity/server/main.lua
index 140a009e..e6c84504 100644
--- a/[core]/esx_identity/server/main.lua
+++ b/[core]/esx_identity/server/main.lua
@@ -245,7 +245,7 @@ end
end
ESX.RegisterServerCallback("esx_identity:registerIdentity", function(source, cb, data)
- local xPlayer = ESX.GetPlayerFromId(source)
+ local xPlayer = ESX.Player(source)
if not checkNameFormat(data.firstname) then
TriggerClientEvent("esx:showNotification", source, TranslateCap("invalid_firstname_format"), "error")
@@ -269,12 +269,12 @@ end
end
if xPlayer then
- if alreadyRegistered[xPlayer.identifier] then
+ if alreadyRegistered[xPlayer.getIdentifier()] then
xPlayer.showNotification(TranslateCap("already_registered"), "error")
return cb(false)
end
- playerIdentity[xPlayer.identifier] = {
+ playerIdentity[xPlayer.getIdentifier()] = {
firstName = formatName(data.firstname),
lastName = formatName(data.lastname),
dateOfBirth = formatDate(data.dateofbirth),
@@ -282,14 +282,14 @@ end
height = data.height,
}
- local currentIdentity = playerIdentity[xPlayer.identifier]
+ local currentIdentity = playerIdentity[xPlayer.getIdentifier()]
SetPlayerData(xPlayer, currentIdentity)
- TriggerClientEvent("esx_identity:setPlayerData", xPlayer.source, currentIdentity)
- saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
- alreadyRegistered[xPlayer.identifier] = true
- playerIdentity[xPlayer.identifier] = nil
+ TriggerClientEvent("esx_identity:setPlayerData", xPlayer.src, currentIdentity)
+ saveIdentityToDatabase(xPlayer.getIdentifier(), currentIdentity)
+ alreadyRegistered[xPlayer.getIdentifier()] = true
+ playerIdentity[xPlayer.getIdentifier()] = nil
return cb(true)
end
@@ -334,13 +334,13 @@ if Config.EnableCommands then
Wait(1500)
deleteIdentity(xPlayer)
xPlayer.showNotification(TranslateCap("deleted_character"))
- playerIdentity[xPlayer.identifier] = nil
- alreadyRegistered[xPlayer.identifier] = false
+ playerIdentity[xPlayer.getIdentifier()] = nil
+ alreadyRegistered[xPlayer.getIdentifier()] = false
else
deleteIdentity(xPlayer)
xPlayer.showNotification(TranslateCap("deleted_character"))
- playerIdentity[xPlayer.identifier] = nil
- alreadyRegistered[xPlayer.identifier] = false
+ playerIdentity[xPlayer.getIdentifier()] = nil
+ alreadyRegistered[xPlayer.getIdentifier()] = false
TriggerClientEvent("esx_identity:showRegisterIdentity", xPlayer.source)
end
else
From 3a37ca3d0c65a39d32499817c328d7d2375e2999 Mon Sep 17 00:00:00 2001
From: Rafael Antunes <147253092+Fellow1990@users.noreply.github.com>
Date: Thu, 14 Aug 2025 19:00:13 +0100
Subject: [PATCH 19/30] use static player methods
ESX Skin
---
[core]/esx_skin/server/main.lua | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/[core]/esx_skin/server/main.lua b/[core]/esx_skin/server/main.lua
index 60ec63df..ff5e87b2 100644
--- a/[core]/esx_skin/server/main.lua
+++ b/[core]/esx_skin/server/main.lua
@@ -2,7 +2,7 @@ RegisterNetEvent("esx_skin:save", function(skin)
if not skin or type(skin) ~= "table" then
return
end
- local xPlayer = ESX.GetPlayerFromId(source)
+ local xPlayer = ESX.Player(source)
if not ESX.GetConfig().CustomInventory then
local defaultMaxWeight = ESX.GetConfig().MaxWeight
@@ -17,12 +17,12 @@ RegisterNetEvent("esx_skin:save", function(skin)
MySQL.update("UPDATE users SET skin = @skin WHERE identifier = @identifier", {
["@skin"] = json.encode(skin),
- ["@identifier"] = xPlayer.identifier,
+ ["@identifier"] = xPlayer.getIdentifier(),
})
end)
RegisterNetEvent("esx_skin:setWeight", function(skin)
- local xPlayer = ESX.GetPlayerFromId(source)
+ local xPlayer = ESX.Player(source)
if not ESX.GetConfig().CustomInventory then
local defaultMaxWeight = ESX.GetConfig().MaxWeight
@@ -37,16 +37,16 @@ RegisterNetEvent("esx_skin:setWeight", function(skin)
end)
ESX.RegisterServerCallback("esx_skin:getPlayerSkin", function(source, cb)
- local xPlayer = ESX.GetPlayerFromId(source)
+ local xPlayer = ESX.Player(source)
MySQL.query("SELECT skin FROM users WHERE identifier = @identifier", {
- ["@identifier"] = xPlayer.identifier,
+ ["@identifier"] = xPlayer.getIdentifier(),
}, function(users)
local user, skin = users[1], nil
local jobSkin = {
- skin_male = xPlayer.job.skin_male,
- skin_female = xPlayer.job.skin_female,
+ skin_male = xPlayer.getJob().skin_male,
+ skin_female = xPlayer.getJob().skin_female,
}
if user.skin then
From 83972de4a204d29c2221802155dd02d09e32bd39 Mon Sep 17 00:00:00 2001
From: Rafael Antunes <147253092+Fellow1990@users.noreply.github.com>
Date: Fri, 15 Aug 2025 18:41:15 +0100
Subject: [PATCH 20/30] Call the same function fix
ESX Identity
---
[core]/esx_identity/server/main.lua | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/[core]/esx_identity/server/main.lua b/[core]/esx_identity/server/main.lua
index e6c84504..c7c8de76 100644
--- a/[core]/esx_identity/server/main.lua
+++ b/[core]/esx_identity/server/main.lua
@@ -269,12 +269,13 @@ end
end
if xPlayer then
- if alreadyRegistered[xPlayer.getIdentifier()] then
+ local identifier = xPlayer.getIdentifier()
+ if alreadyRegistered[identifier] then
xPlayer.showNotification(TranslateCap("already_registered"), "error")
return cb(false)
end
- playerIdentity[xPlayer.getIdentifier()] = {
+ playerIdentity[identifier] = {
firstName = formatName(data.firstname),
lastName = formatName(data.lastname),
dateOfBirth = formatDate(data.dateofbirth),
@@ -282,14 +283,14 @@ end
height = data.height,
}
- local currentIdentity = playerIdentity[xPlayer.getIdentifier()]
+ local currentIdentity = playerIdentity[identifier]
SetPlayerData(xPlayer, currentIdentity)
TriggerClientEvent("esx_identity:setPlayerData", xPlayer.src, currentIdentity)
- saveIdentityToDatabase(xPlayer.getIdentifier(), currentIdentity)
- alreadyRegistered[xPlayer.getIdentifier()] = true
- playerIdentity[xPlayer.getIdentifier()] = nil
+ saveIdentityToDatabase(identifier, currentIdentity)
+ alreadyRegistered[identifier] = true
+ playerIdentity[identifier] = nil
return cb(true)
end
@@ -329,18 +330,19 @@ if Config.EnableCommands then
ESX.RegisterCommand("chardel", "user", function(xPlayer)
if xPlayer and xPlayer.getName() then
+ local identifier = xPlayer.getIdentifier()
if Config.UseDeferrals then
xPlayer.kick(TranslateCap("deleted_identity"))
Wait(1500)
deleteIdentity(xPlayer)
xPlayer.showNotification(TranslateCap("deleted_character"))
- playerIdentity[xPlayer.getIdentifier()] = nil
- alreadyRegistered[xPlayer.getIdentifier()] = false
+ playerIdentity[identifier] = nil
+ alreadyRegistered[identifier] = false
else
deleteIdentity(xPlayer)
xPlayer.showNotification(TranslateCap("deleted_character"))
- playerIdentity[xPlayer.getIdentifier()] = nil
- alreadyRegistered[xPlayer.getIdentifier()] = false
+ playerIdentity[identifier] = nil
+ alreadyRegistered[identifier] = false
TriggerClientEvent("esx_identity:showRegisterIdentity", xPlayer.source)
end
else
From fc49dcbcb4fba78d4b4e20e035b3171a7200993b Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sat, 16 Aug 2025 00:22:50 +0200
Subject: [PATCH 21/30] feat(es_extended): add SSN
---
[SQL]/legacy.sql | 4 ++
[core]/es_extended/es_extended.sql | 4 +-
[core]/es_extended/server/classes/player.lua | 9 +++-
[core]/es_extended/server/functions.lua | 45 ++++++++++++++++++++
[core]/es_extended/server/main.lua | 14 +++---
5 files changed, 69 insertions(+), 7 deletions(-)
diff --git a/[SQL]/legacy.sql b/[SQL]/legacy.sql
index e8044593..655e5d7e 100644
--- a/[SQL]/legacy.sql
+++ b/[SQL]/legacy.sql
@@ -385,6 +385,7 @@ CREATE TABLE `society_moneywash` (
CREATE TABLE `users` (
`identifier` varchar(60) NOT NULL,
+ `ssn` VARCHAR(11) NOT NULL,
`accounts` longtext DEFAULT NULL,
`group` varchar(50) DEFAULT 'user',
`inventory` longtext DEFAULT NULL,
@@ -847,6 +848,9 @@ ALTER TABLE `users`
ADD PRIMARY KEY (`identifier`),
ADD UNIQUE KEY `id` (`id`);
+ALTER TABLE `users`
+ ADD UNIQUE KEY `unique_ssn` (`ssn`);
+
--
-- Indexes for table `user_licenses`
--
diff --git a/[core]/es_extended/es_extended.sql b/[core]/es_extended/es_extended.sql
index c6108928..b4546112 100644
--- a/[core]/es_extended/es_extended.sql
+++ b/[core]/es_extended/es_extended.sql
@@ -10,6 +10,7 @@ USE `es_extended`;
CREATE TABLE `users` (
`identifier` VARCHAR(60) NOT NULL,
+ `ssn` VARCHAR(11) NOT NULL,
`accounts` LONGTEXT NULL DEFAULT NULL,
`group` VARCHAR(50) NULL DEFAULT 'user',
`inventory` LONGTEXT NULL DEFAULT NULL,
@@ -19,7 +20,8 @@ CREATE TABLE `users` (
`metadata` LONGTEXT NULL DEFAULT NULL,
`position` longtext NULL DEFAULT NULL,
- PRIMARY KEY (`identifier`)
+ PRIMARY KEY (`identifier`),
+ UNIQUE KEY `unique_ssn` (`ssn`)
) ENGINE=InnoDB;
CREATE TABLE `items` (
diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua
index fb02f3aa..97ae2695 100644
--- a/[core]/es_extended/server/classes/player.lua
+++ b/[core]/es_extended/server/classes/player.lua
@@ -19,6 +19,7 @@
---@param playerId number
---@param identifier string
+---@param ssn string
---@param group string
---@param accounts table
---@param inventory table
@@ -28,7 +29,7 @@
---@param name string
---@param coords table | vector4
---@param metadata table
-function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, weight, job, loadout, name, coords, metadata)
+function CreateExtendedPlayer(playerId, identifier, ssn, group, accounts, inventory, weight, job, loadout, name, coords, metadata)
---@class xPlayer
local self = {}
@@ -36,6 +37,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
self.coords = coords
self.group = group
self.identifier = identifier
+ self.ssn = ssn
self.inventory = inventory
self.job = job
self.loadout = loadout
@@ -173,6 +175,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return self.identifier
end
+ ---@return string
+ function self.getSSN()
+ return self.ssn
+ end
+
---@param newGroup string
---@return nil
function self.setGroup(newGroup)
diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua
index 261d973b..fa2b2ec4 100644
--- a/[core]/es_extended/server/functions.lua
+++ b/[core]/es_extended/server/functions.lua
@@ -804,6 +804,51 @@ function Core.IsPlayerAdmin(playerSrc)
return xPlayer and Config.AdminGroups[xPlayer.getGroup()] or false
end
+-- Generates a unique 9-digit SSN in dashed format (XXX-XX-XXXX).
+---@return string
+function Core.generateSSN()
+ local reservedSSNs = {
+ ["078-05-1120"] = true,
+ ["219-09-9999"] = true,
+ ["123-45-6789"] = true
+ }
+
+ while true do
+ -- Generate the first part (area number)
+ local area = math.random(1, 899)
+
+ -- 666 is never assigned
+ if area == 666 then
+ goto continue
+ end
+
+ -- Generate the second part (group number)
+ local group = math.random(1, 99)
+
+ -- Generate the last part (serial number)
+ local serial = math.random(1, 9999)
+
+ -- Skip reserved SSN range (987-65-4320..4329)
+ if area == 987 and group == 65 and serial >= 4320 and serial <= 4329 then
+ goto continue
+ end
+
+ local candidate = string.format("%03d-%02d-%04d", area, group, serial)
+
+ if reservedSSNs[candidate] then
+ goto continue
+ end
+
+ local exists = MySQL.scalar.await("SELECT 1 FROM `users` WHERE `ssn` = ? LIMIT 1", { candidate })
+
+ if not exists then
+ return candidate
+ end
+
+ ::continue::
+ end
+end
+
---@param owner string
---@param plate string
---@param coords vector4
diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua
index 50fc369b..820b49c7 100644
--- a/[core]/es_extended/server/main.lua
+++ b/[core]/es_extended/server/main.lua
@@ -2,8 +2,8 @@ SetMapName("San Andreas")
SetGameType("ESX Legacy")
local oneSyncState = GetConvar("onesync", "off")
-local newPlayer = "INSERT INTO `users` SET `accounts` = ?, `identifier` = ?, `group` = ?"
-local loadPlayer = "SELECT `accounts`, `job`, `job_grade`, `group`, `position`, `inventory`, `skin`, `loadout`, `metadata`"
+local newPlayer = "INSERT INTO `users` SET `accounts` = ?, `identifier` = ?, `ssn` = ?, `group` = ?"
+local loadPlayer = "SELECT `accounts`, `ssn`, `job`, `job_grade`, `group`, `position`, `inventory`, `skin`, `loadout`, `metadata`"
if Config.Multichar then
newPlayer = newPlayer .. ", `firstname` = ?, `lastname` = ?, `dateofbirth` = ?, `sex` = ?, `height` = ?"
@@ -31,8 +31,9 @@ local function createESXPlayer(identifier, playerId, data)
print(("[^2INFO^0] Player ^5%s^0 Has been granted admin permissions via ^5Ace Perms^7."):format(playerId))
defaultGroup = "admin"
end
-
- local parameters = Config.Multichar and { json.encode(accounts), identifier, defaultGroup, data.firstname, data.lastname, data.dateofbirth, data.sex, data.height } or { json.encode(accounts), identifier, defaultGroup }
+ local parameters = Config.Multichar and
+ { json.encode(accounts), identifier, Core.generateSSN(), defaultGroup, data.firstname, data.lastname, data.dateofbirth, data.sex, data.height }
+ or { json.encode(accounts), identifier, Core.generateSSN(), defaultGroup }
if Config.StartingInventoryItems then
table.insert(parameters, json.encode(Config.StartingInventoryItems))
@@ -216,6 +217,9 @@ function loadESXPlayer(identifier, playerId, isNew)
}
end
+ -- SSN
+ userData.ssn = result.ssn
+
-- Job
local job, grade = result.job, tostring(result.job_grade)
@@ -308,7 +312,7 @@ function loadESXPlayer(identifier, playerId, isNew)
userData.metadata = (result.metadata and result.metadata ~= "") and json.decode(result.metadata) or {}
-- xPlayer Creation
- local xPlayer = CreateExtendedPlayer(playerId, identifier, userData.group, userData.accounts, userData.inventory, userData.weight, userData.job, userData.loadout, GetPlayerName(playerId), userData.coords, userData.metadata)
+ local xPlayer = CreateExtendedPlayer(playerId, identifier, userData.ssn, userData.group, userData.accounts, userData.inventory, userData.weight, userData.job, userData.loadout, GetPlayerName(playerId), userData.coords, userData.metadata)
GlobalState["playerCount"] = GlobalState["playerCount"] + 1
ESX.Players[playerId] = xPlayer
From cbfbb742860937f581a0dc3444e6c2ab7fb0d62b Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sat, 16 Aug 2025 12:50:40 +0200
Subject: [PATCH 22/30] chore: fix linting errors
---
[core]/es_extended/client/imports/point.lua | 2 +-
[core]/es_extended/client/modules/scaleform.lua | 2 +-
[core]/es_extended/locales/es.lua | 16 ++++++++--------
[core]/es_extended/server/functions.lua | 2 +-
[core]/esx_notify/Config.lua | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/[core]/es_extended/client/imports/point.lua b/[core]/es_extended/client/imports/point.lua
index 5c505cc8..89deb1bc 100644
--- a/[core]/es_extended/client/imports/point.lua
+++ b/[core]/es_extended/client/imports/point.lua
@@ -18,7 +18,7 @@ function Point:constructor(properties)
CreateThread(function()
while loop do
local coords = GetEntityCoords(ESX.PlayerData.ped)
- for handle, point in pairs(nearby) do
+ for _, point in pairs(nearby) do
if point.inside then
point:inside(#(coords - point.coords))
end
diff --git a/[core]/es_extended/client/modules/scaleform.lua b/[core]/es_extended/client/modules/scaleform.lua
index 16d4752d..0662f9c3 100644
--- a/[core]/es_extended/client/modules/scaleform.lua
+++ b/[core]/es_extended/client/modules/scaleform.lua
@@ -73,7 +73,7 @@ function ESX.Scaleform.Utils.RunMethod(scaleform, methodName, returnValue, ...)
BeginScaleformMovieMethod(scaleform, methodName)
local args = { ... }
- for i, arg in ipairs(args) do
+ for _, arg in ipairs(args) do
local typeArg = type(arg)
if typeArg == "number" then
diff --git a/[core]/es_extended/locales/es.lua b/[core]/es_extended/locales/es.lua
index c61b1a34..27c55d0d 100644
--- a/[core]/es_extended/locales/es.lua
+++ b/[core]/es_extended/locales/es.lua
@@ -4,7 +4,7 @@ return {
["received_help"] = "Has cobrado tu subsidio: $%s",
["company_nomoney"] = "La empresa para la que trabajas es demasiado pobre para pagarte el sueldo",
["received_paycheck"] = "Nómina recibida",
- ["bank"] = "Maze Bank",
+ ["bank"] = "Maze Bank",
["account_bank"] = "Banco",
["account_black_money"] = "Dinero negro",
["account_money"] = "Efectivo",
@@ -128,7 +128,7 @@ return {
["weapon_snspistol"] = "Pistola SNS",
["weapon_snspistol_mk2"] = "Pistola SNS Mk2",
["weapon_stungun"] = "Pistola eléctrica",
- ["weapon_raypistol"] = "Pistola de Rayos",
+ ["weapon_raypistol"] = "Pistola de Rayos",
["weapon_vintagepistol"] = "Pistola vintage",
-- Shotguns
@@ -156,7 +156,7 @@ return {
["weapon_smg"] = "Subfusil",
["weapon_smg_mk2"] = "Subfusil Mk2",
["weapon_raycarbine"] = "Carabina de Rayos",
- ["weapon_tecpistol"] = "Subfusil táctico",
+ ["weapon_tecpistol"] = "Subfusil táctico",
-- Rifles
["weapon_advancedrifle"] = "Fusil avanzado",
@@ -196,9 +196,9 @@ return {
["weapon_tactilerifle"] = "Carabina de servicio",
-- Drug wars dlc
- ["weapon_candycane"] = "Bastón de caramelo",
- ["weapon_acidpackage"] = "Paquete de ácido",
- ["weapon_pistolxm3"] = "Pistola WM 29",
+ ["weapon_candycane"] = "Bastón de caramelo",
+ ["weapon_acidpackage"] = "Paquete de ácido",
+ ["weapon_pistolxm3"] = "Pistola WM 29",
["weapon_railgunxm3"] = "Cañón de riel",
-- Chop Shop DLC
@@ -220,7 +220,7 @@ return {
["weapon_pipebomb"] = "Bomba casera",
["weapon_snowball"] = "Bola de nieve",
["weapon_stickybomb"] = "Bomba lapa",
- ["weapon_smokegrenade"] = "Granada de humo",
+ ["weapon_smokegrenade"] = "Granada de humo",
-- Special
["weapon_fireextinguisher"] = "Extintor",
@@ -309,7 +309,7 @@ return {
["component_ammo_tracer"] = "Munición trazadora",
["component_ammo_incendiary"] = "Munición incendiaria",
["component_ammo_hollowpoint"] = "Munición de punta hueca",
- ["component_ammo_fmj"] = "Munición FMJ",
+ ["component_ammo_fmj"] = "Munición FMJ",
["component_ammo_armor"] = "Munición perforante",
["component_ammo_explosive"] = "Munición explosiva perforante",
diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua
index 261d973b..2d97f092 100644
--- a/[core]/es_extended/server/functions.lua
+++ b/[core]/es_extended/server/functions.lua
@@ -662,7 +662,7 @@ if not Config.CustomInventory then
local xPlayer = xPlayers[i]
local minimalInv = xPlayer.getInventory(true)
- for itemName, itemCount in pairs(minimalInv) do
+ for itemName, _ in pairs(minimalInv) do
if not ESX.Items[itemName] then
xPlayer.setInventoryItem(itemName, 0)
minimalInv[itemName] = nil
diff --git a/[core]/esx_notify/Config.lua b/[core]/esx_notify/Config.lua
index 90f6d653..e56a8901 100644
--- a/[core]/esx_notify/Config.lua
+++ b/[core]/esx_notify/Config.lua
@@ -1,3 +1,3 @@
Config = {}
-Config.notificationSoundEnabled = true
\ No newline at end of file
+Config.notificationSoundEnabled = true
\ No newline at end of file
From 5bb1e5f09ea7bcf5b055ba3cbf9097dfd06a46e1 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sat, 16 Aug 2025 12:51:38 +0200
Subject: [PATCH 23/30] chore: fix linting errors
---
[core]/es_extended/locales/es.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/[core]/es_extended/locales/es.lua b/[core]/es_extended/locales/es.lua
index 27c55d0d..7e0a1f14 100644
--- a/[core]/es_extended/locales/es.lua
+++ b/[core]/es_extended/locales/es.lua
@@ -86,7 +86,7 @@ return {
["disabled"] = "~r~desactivado~s~",
-- Locale settings
- ["locale_digit_grouping_symbol"] = ".",
+ ["locale_digit_grouping_symbol"] = ".",
["locale_currency"] = "%s€",
-- Weapons
From 260d9b30ee31de8fc8e1c1122a178cee66666325 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sat, 16 Aug 2025 14:14:16 +0200
Subject: [PATCH 24/30] refactor(es_extended/server/class/player): add proper
type annotations
---
[core]/es_extended/server/classes/player.lua | 322 +++++++++----------
[core]/es_extended/server/functions.lua | 4 +-
[core]/es_extended/shared/functions.lua | 3 +-
3 files changed, 151 insertions(+), 178 deletions(-)
diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua
index fb02f3aa..3d5f0cd6 100644
--- a/[core]/es_extended/server/classes/player.lua
+++ b/[core]/es_extended/server/classes/player.lua
@@ -1,36 +1,150 @@
+---@class ESXAccount
+---@field name string # Account name (e.g., "bank", "money").
+---@field money number # Current balance in this account.
+---@field label string # Human-readable label for the account.
+---@field round boolean # Whether amounts are rounded for display.
+---@field index number # Index of the account in the player's accounts list.
+
+---@class ESXItem
+---@field name string # Item identifier (internal name).
+---@field label string # Display name of the item.
+---@field weight number # Weight of a single unit of the item.
+---@field usable boolean # Whether the item can be used.
+---@field rare boolean # Whether the item is rare.
+---@field canRemove boolean # Whether the item can be removed from inventory.
+
+---@class ESXInventoryItem:ESXItem
+---@field count number # Number of this item in the player's inventory.
+
+---@class ESXJob
+---@field id number # Job ID.
+---@field name string # Job internal name.
+---@field label string # Job display label.
+---@field grade number # Current grade/rank number.
+---@field grade_name string # Name of the current grade.
+---@field grade_label string # Label of the current grade.
+---@field grade_salary number # Salary for the current grade.
+---@field skin_male table # Skin configuration for male characters.
+---@field skin_female table # Skin configuration for female characters.
+---@field onDuty boolean? # Whether the player is currently on duty.
+
+---@class ESXWeapon
+---@field name string # Weapon identifier (internal name).
+---@field label string # Weapon display name.
+
+---@class ESXInventoryWeapon:ESXWeapon
+---@field ammo number # Amount of ammo in the weapon.
+---@field components string[] # List of components attached to the weapon.
+---@field tintIndex number # Current weapon tint index.
+
+---@class ESXWeaponComponent
+---@field name string # Component identifier (internal name).
+---@field label string # Component display name.
+---@field hash string|number # Component hash or identifier.
+
---@class xPlayer
----@field accounts table
----@field coords table
----@field group string
----@field identifier string
----@field inventory table
----@field job table
----@field loadout table
----@field name string
----@field playerId number
----@field source number
----@field variables table
----@field weight number
----@field maxWeight number
----@field metadata table
----@field lastPlaytime number
----@field admin boolean
----@field license string
+--- Properties
+---@field accounts ESXAccount[] # Array of the player's accounts.
+---@field coords table # Player's coordinates {x, y, z, heading}.
+---@field group string # Player permission group.
+---@field identifier string # Unique identifier (usually Steam or license).
+---@field license string # Player license string.
+---@field inventory ESXInventoryItem[] # Player's inventory items.
+---@field job ESXJob # Player's current job.
+---@field loadout ESXInventoryWeapon[] # Player's current weapons.
+---@field name string # Player's display name.
+---@field playerId number # Player's ID (server ID).
+---@field source number # Player's source (alias for playerId).
+---@field variables table # Custom player variables.
+---@field weight number # Current carried weight.
+---@field maxWeight number # Maximum carry weight.
+---@field metadata table # Custom metadata table.
+---@field lastPlaytime number # Last recorded playtime in seconds.
+---@field paycheckEnabled boolean # Whether paycheck is enabled.
+---@field admin boolean # Whether the player is an admin.
+--- Money Functions
+---@field setMoney fun(money: number) # Set player's cash balance.
+---@field getMoney fun(): number # Get player's current cash balance.
+---@field addMoney fun(money: number, reason: string) # Add money to the player's cash balance.
+---@field removeMoney fun(money: number, reason: string) # Remove money from the player's cash balance.
+---@field setAccountMoney fun(accountName: string, money: number, reason?: string) # Set specific account balance.
+---@field addAccountMoney fun(accountName: string, money: number, reason?: string) # Add money to an account.
+---@field removeAccountMoney fun(accountName: string, money: number, reason?: string) # Remove money from an account.
+---@field getAccount fun(account: string): ESXAccount? # Get account data by name.
+---@field getAccounts fun(minimal?: boolean): ESXAccount[]|table # Get all accounts, optionally minimal.
+--- Inventory Functions
+---@field getInventory fun(minimal?: boolean): ESXInventoryItem[]|table # Get inventory, optionally minimal.
+---@field getInventoryItem fun(itemName: string): ESXInventoryItem? # Get a specific item from inventory.
+---@field addInventoryItem fun(itemName: string, count: number) # Add items to inventory.
+---@field removeInventoryItem fun(itemName: string, count: number) # Remove items from inventory.
+---@field setInventoryItem fun(itemName: string, count: number) # Set item count in inventory.
+---@field getWeight fun(): number # Get current carried weight.
+---@field getMaxWeight fun(): number # Get maximum carry weight.
+---@field setMaxWeight fun(newWeight: number) # Set maximum carry weight.
+---@field canCarryItem fun(itemName: string, count: number): boolean # Check if player can carry more of an item.
+---@field canSwapItem fun(firstItem: string, firstItemCount: number, testItem: string, testItemCount: number): boolean # Check if items can be swapped.
+---@field hasItem fun(item: string): ESXInventoryItem|false, number? # Check if player has an item.
+---@field getLoadout fun(minimal?: boolean): ESXInventoryWeapon[]|table # Get player's weapon loadout.
+--- Job Functions
+---@field getJob fun(): ESXJob # Get player's current job.
+---@field setJob fun(newJob: string, grade: string, onDuty?: boolean) # Set player's job and grade.
+---@field setGroup fun(newGroup: string) # Set player's permission group.
+---@field getGroup fun(): string # Get player's permission group.
+--- Weapon Functions
+---@field addWeapon fun(weaponName: string, ammo: number) # Give player a weapon.
+---@field removeWeapon fun(weaponName: string) # Remove weapon from player.
+---@field hasWeapon fun(weaponName: string): boolean # Check if player has a weapon.
+---@field getWeapon fun(weaponName: string): number?, table? # Get weapon ammo & components.
+---@field addWeaponAmmo fun(weaponName: string, ammoCount: number) # Add ammo to a weapon.
+---@field removeWeaponAmmo fun(weaponName: string, ammoCount: number) # Remove ammo from a weapon.
+---@field updateWeaponAmmo fun(weaponName: string, ammoCount: number) # Update ammo count for a weapon.
+---@field addWeaponComponent fun(weaponName: string, weaponComponent: string) # Add component to weapon.
+---@field removeWeaponComponent fun(weaponName: string, weaponComponent: string) # Remove component from weapon.
+---@field hasWeaponComponent fun(weaponName: string, weaponComponent: string): boolean # Check if weapon has component.
+---@field setWeaponTint fun(weaponName: string, weaponTintIndex: number) # Set weapon tint.
+---@field getWeaponTint fun(weaponName: string): number # Get weapon tint.
+--- Player State Functions
+---@field getIdentifier fun(): string # Get player's unique identifier.
+---@field getSource fun(): number # Get player source/server ID.
+---@field getPlayerId fun(): number # Alias for getSource.
+---@field getName fun(): string # Get player's name.
+---@field setName fun(newName: string) # Set player's name.
+---@field setCoords fun(coordinates: vector4|vector3|table) # Teleport player to coordinates.
+---@field getCoords fun(vector?: boolean, heading?: boolean): vector3|vector4|table # Get player's coordinates.
+---@field isAdmin fun(): boolean # Check if player is admin.
+---@field kick fun(reason: string) # Kick player from server.
+---@field getPlayTime fun(): number # Get total playtime in seconds.
+---@field set fun(k: string, v: any) # Set custom variable.
+---@field get fun(k: string): any # Get custom variable.
+--- Metadata Functions
+---@field getMeta fun(index?: string, subIndex?: string|table): any # Get metadata value(s).
+---@field setMeta fun(index: string, value: any, subValue?: any) # Set metadata value(s).
+---@field clearMeta fun(index: string, subValues?: string|table) # Clear metadata value(s).
+--- Notification Functions
+---@field showNotification fun(msg: string, notifyType?: string, length?: number) # Show a simple notification.
+---@field showAdvancedNotification fun(sender: string, subject: string, msg: string, textureDict: string, iconType: string, flash: boolean, saveToBrief: boolean, hudColorIndex: number) # Show advanced notification.
+---@field showHelpNotification fun(msg: string, thisFrame?: boolean, beep?: boolean, duration?: number) # Show help notification.
+--- Misc Functions
+---@field togglePaycheck fun(toggle: boolean) # Enable/disable paycheck.
+---@field isPaycheckEnabled fun(): boolean # Check if paycheck is enabled.
+---@field executeCommand fun(command: string) # Execute a server command.
+---@field triggerEvent fun(eventName: string, ...) # Trigger client event for this player.
---@param playerId number
---@param identifier string
---@param group string
----@param accounts table
+---@param accounts ESXAccount[]
---@param inventory table
---@param weight number
----@param job table
----@param loadout table
+---@param job ESXJob
+---@param loadout ESXInventoryWeapon[]
---@param name string
----@param coords table | vector4
+---@param coords vector4|{x: number, y: number, z: number, heading: number}
---@param metadata table
+---@return xPlayer
function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, weight, job, loadout, name, coords, metadata)
- ---@class xPlayer
- local self = {}
+ ---@diagnostic disable-next-line: missing-fields
+ local self = {} ---@type xPlayer
self.accounts = accounts
self.coords = coords
@@ -72,32 +186,23 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
stateBag:set("group", self.group, true)
stateBag:set("name", self.name, true)
- ---@param eventName string
- ---@param ... any
- ---@return nil
function self.triggerEvent(eventName, ...)
assert(type(eventName) == "string", "eventName should be string!")
TriggerClientEvent(eventName, self.source, ...)
end
- ---@param toggle boolean
- ---@return nil
function self.togglePaycheck(toggle)
self.paycheckEnabled = toggle
end
- ---@return boolean
function self.isPaycheckEnabled()
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)
local ped = GetPlayerPed(self.source)
@@ -105,9 +210,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
SetEntityHeading(ped, coordinates.w or coordinates.heading or 0.0)
end
- ---@param vector boolean
- ---@param heading boolean
- ---@return vector3 | vector4 | table
function self.getCoords(vector, heading)
local ped = GetPlayerPed(self.source)
local entityCoords = GetEntityCoords(ped)
@@ -126,55 +228,39 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return coordinates
end
- ---@param reason string
- ---@return nil
function self.kick(reason)
- local source = tostring(self.source)
- DropPlayer(source, reason)
+ DropPlayer(self.source --[[@as string]], reason)
end
- ---@return number
function self.getPlayTime()
-- luacheck: ignore
- return self.lastPlaytime + GetPlayerTimeOnline(self.source)
+ return self.lastPlaytime + GetPlayerTimeOnline(self.source --[[@as string]])
end
- ---@param money number
- ---@return nil
function self.setMoney(money)
assert(type(money) == "number", "money should be number!")
money = ESX.Math.Round(money)
self.setAccountMoney("money", money)
end
- ---@return number
function self.getMoney()
return self.getAccount("money").money
end
- ---@param money number
- ---@param reason string
- ---@return nil
function self.addMoney(money, reason)
money = ESX.Math.Round(money)
self.addAccountMoney("money", money, reason)
end
- ---@param money number
- ---@param reason string
- ---@return nil
function self.removeMoney(money, reason)
money = ESX.Math.Round(money)
self.removeAccountMoney("money", money, reason)
end
- ---@return string
function self.getIdentifier()
return self.identifier
end
- ---@param newGroup string
- ---@return nil
function self.setGroup(newGroup)
local lastGroup = self.group
@@ -189,28 +275,20 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
ExecuteCommand(("add_principal identifier.%s group.%s"):format(self.license, self.group))
end
- ---@return string
function self.getGroup()
return self.group
end
- ---@param k string
- ---@param v any
- ---@return nil
function self.set(k, v)
self.variables[k] = v
-
+
self.triggerEvent('esx:updatePlayerData', 'variables', self.variables)
end
- ---@param k string
- ---@return any
function self.get(k)
return self.variables[k]
end
- ---@param minimal boolean
- ---@return table
function self.getAccounts(minimal)
if not minimal then
return self.accounts
@@ -225,8 +303,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return minimalAccounts
end
- ---@param account string
- ---@return table | nil
function self.getAccount(account)
account = string.lower(account)
for i = 1, #self.accounts do
@@ -238,8 +314,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return nil
end
- ---@param minimal boolean
- ---@return table
function self.getInventory(minimal)
if minimal then
local minimalInventory = {}
@@ -256,13 +330,10 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return self.inventory
end
- ---@return table
function self.getJob()
return self.job
end
- ---@param minimal boolean
- ---@return table
function self.getLoadout(minimal)
if not minimal then
return self.loadout
@@ -293,22 +364,15 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return minimalLoadout
end
- ---@return string
function self.getName()
return self.name
end
- ---@param newName string
- ---@return nil
function self.setName(newName)
self.name = newName
Player(self.source).state:set("name", self.name, true)
end
- ---@param accountName string
- ---@param money number
- ---@param reason string | nil
- ---@return nil
function self.setAccountMoney(accountName, money, reason)
reason = reason or "unknown"
if not tonumber(money) then
@@ -332,10 +396,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param accountName string
- ---@param money number
- ---@param reason string | nil
- ---@return nil
function self.addAccountMoney(accountName, money, reason)
reason = reason or "Unknown"
if not tonumber(money) then
@@ -358,10 +418,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param accountName string
- ---@param money number
- ---@param reason string | nil
- ---@return nil
function self.removeAccountMoney(accountName, money, reason)
reason = reason or "Unknown"
if not tonumber(money) then
@@ -389,8 +445,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param itemName string
- ---@return table | nil
function self.getInventoryItem(itemName)
for _, v in ipairs(self.inventory) do
if v.name == itemName then
@@ -400,9 +454,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return nil
end
- ---@param itemName string
- ---@param count number
- ---@return nil
function self.addInventoryItem(itemName, count)
local item = self.getInventoryItem(itemName)
@@ -416,9 +467,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param itemName string
- ---@param count number
- ---@return nil
function self.removeInventoryItem(itemName, count)
local item = self.getInventoryItem(itemName)
@@ -440,9 +488,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param itemName string
- ---@param count number
- ---@return nil
function self.setInventoryItem(itemName, count)
local item = self.getInventoryItem(itemName)
@@ -457,25 +502,19 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@return number
function self.getWeight()
return self.weight
end
- ---@return number
function self.getSource()
return self.source
end
self.getPlayerId = self.getSource
- ---@return number
function self.getMaxWeight()
return self.maxWeight
end
- ---@param itemName string
- ---@param count number
- ---@return boolean
function self.canCarryItem(itemName, count)
if ESX.Items[itemName] then
local currentWeight, itemWeight = self.weight, ESX.Items[itemName].weight
@@ -488,11 +527,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param firstItem string
- ---@param firstItemCount number
- ---@param testItem string
- ---@param testItemCount number
- ---@return boolean
function self.canSwapItem(firstItem, firstItemCount, testItem, testItemCount)
local firstItemObject = self.getInventoryItem(firstItem)
if not firstItemObject then
@@ -513,17 +547,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return false
end
- ---@param newWeight number
- ---@return nil
function self.setMaxWeight(newWeight)
self.maxWeight = newWeight
self.triggerEvent("esx:setMaxWeight", self.maxWeight)
end
- ---@param newJob string
- ---@param grade string
- ---@param onDuty? boolean
- ---@return nil
function self.setJob(newJob, grade, onDuty)
grade = tostring(grade)
local lastJob = self.job
@@ -548,7 +576,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
label = jobObject.label,
onDuty = onDuty,
- grade = tonumber(grade),
+ grade = tonumber(grade) or 0,
grade_name = gradeObject.name,
grade_label = gradeObject.label,
grade_salary = gradeObject.salary,
@@ -563,9 +591,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
Player(self.source).state:set("job", self.job, true)
end
- ---@param weaponName string
- ---@param ammo number
- ---@return nil
function self.addWeapon(weaponName, ammo)
if not self.hasWeapon(weaponName) then
local weaponLabel = ESX.GetWeaponLabel(weaponName)
@@ -584,9 +609,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@param weaponComponent string
- ---@return nil
function self.addWeaponComponent(weaponName, weaponComponent)
local loadoutNum , weapon = self.getWeapon(weaponName)
@@ -604,9 +626,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@param ammoCount number
- ---@return nil
function self.addWeaponAmmo(weaponName, ammoCount)
local _, weapon = self.getWeapon(weaponName)
@@ -616,9 +635,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@param ammoCount number
- ---@return nil
function self.updateWeaponAmmo(weaponName, ammoCount)
local _, weapon = self.getWeapon(weaponName)
@@ -636,9 +652,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@param weaponTintIndex number
- ---@return nil
function self.setWeaponTint(weaponName, weaponTintIndex)
local loadoutNum , weapon = self.getWeapon(weaponName)
@@ -653,8 +666,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@return number
function self.getWeaponTint(weaponName)
local _, weapon = self.getWeapon(weaponName)
@@ -665,8 +676,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return 0
end
- ---@param weaponName string
- ---@return nil
function self.removeWeapon(weaponName)
local weaponLabel, playerPed = nil, GetPlayerPed(self.source)
@@ -697,9 +706,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@param weaponComponent string
- ---@return nil
function self.removeWeaponComponent(weaponName, weaponComponent)
local loadoutNum , weapon = self.getWeapon(weaponName)
@@ -722,9 +728,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@param ammoCount number
- ---@return nil
function self.removeWeaponAmmo(weaponName, ammoCount)
local _, weapon = self.getWeapon(weaponName)
@@ -734,9 +737,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
end
- ---@param weaponName string
- ---@param weaponComponent string
- ---@return boolean
function self.hasWeaponComponent(weaponName, weaponComponent)
local _, weapon = self.getWeapon(weaponName)
@@ -753,8 +753,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return false
end
- ---@param weaponName string
- ---@return boolean
function self.hasWeapon(weaponName)
for _, v in ipairs(self.loadout) do
if v.name == weaponName then
@@ -765,8 +763,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return false
end
- ---@param item string
- ---@return table | false, number | nil
function self.hasItem(item)
for _, v in ipairs(self.inventory) do
if v.name == item and v.count >= 1 then
@@ -777,8 +773,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return false
end
- ---@param weaponName string
- ---@return number | nil, table | nil
function self.getWeapon(weaponName)
for k, v in ipairs(self.loadout) do
if v.name == weaponName then
@@ -789,39 +783,19 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return nil, nil
end
- ---@param msg string
- ---@param notifyType string
- ---@param length number
- ---@return nil
function self.showNotification(msg, notifyType, length)
self.triggerEvent("esx:showNotification", msg, notifyType, length)
end
- ---@param sender string
- ---@param subject string
- ---@param msg string
- ---@param textureDict string
- ---@param iconType string
- ---@param flash boolean
- ---@param saveToBrief boolean
- ---@param hudColorIndex number
- ---@return nil
+
function self.showAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
self.triggerEvent("esx:showAdvancedNotification", sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
end
- ---@param msg string
- ---@param thisFrame boolean
- ---@param beep boolean
- ---@param duration number
- ---@return nil
function self.showHelpNotification(msg, thisFrame, beep, duration)
self.triggerEvent("esx:showHelpNotification", msg, thisFrame, beep, duration)
end
- ---@param index any
- ---@param subIndex any
- ---@return table | nil
function self.getMeta(index, subIndex)
if not index then
return self.metadata
@@ -867,10 +841,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
return metaData
end
- ---@param index any
- ---@param value any
- ---@param subValue any
- ---@return nil
function self.setMeta(index, value, subValue)
if not index then
return error("xPlayer.setMeta ^5index^1 is Missing!")
@@ -918,7 +888,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
local metaData = self.metadata[index]
if metaData == nil then
- return Config.EnableDebug and error(("xPlayer.clearMeta ^5%s^1 does not exist!"):format(index)) or nil
+ if Config.EnableDebug then
+ error(("xPlayer.clearMeta ^5%s^1 does not exist!"):format(index))
+ end
+
+ return
end
if not subValues then
@@ -951,8 +925,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
self.triggerEvent('esx:updatePlayerData', 'metadata', self.metadata)
end
- ---@param command string
- ---@return nil
function self.executeCommand(command)
if type(command) ~= "string" then
error("xPlayer.executeCommand must be of type string!")
diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua
index 261d973b..403aab50 100644
--- a/[core]/es_extended/server/functions.lua
+++ b/[core]/es_extended/server/functions.lua
@@ -348,13 +348,13 @@ function ESX.GetNumPlayers(key, val)
end
---@param source number
----@return table
+---@return xPlayer
function ESX.GetPlayerFromId(source)
return ESX.Players[tonumber(source)]
end
---@param identifier string
----@return table
+---@return xPlayer
function ESX.GetPlayerFromIdentifier(identifier)
return Core.playersByIdentifier[identifier]
end
diff --git a/[core]/es_extended/shared/functions.lua b/[core]/es_extended/shared/functions.lua
index 8c39e2f5..e8fe8a76 100644
--- a/[core]/es_extended/shared/functions.lua
+++ b/[core]/es_extended/shared/functions.lua
@@ -76,7 +76,7 @@ end
---@param weaponName string
---@param weaponComponent string
----@return table | nil
+---@return ESXWeaponComponent?
function ESX.GetWeaponComponent(weaponName, weaponComponent)
weaponName = string.upper(weaponName)
@@ -84,6 +84,7 @@ function ESX.GetWeaponComponent(weaponName, weaponComponent)
local weapon = Config.Weapons[weaponsByName[weaponName]]
for _, component in ipairs(weapon.components) do
+ ---@cast component ESXWeaponComponent
if component.name == weaponComponent then
return component
end
From ceb2927fcd73c13e94ec2119b52337b9e8154326 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sat, 16 Aug 2025 14:21:36 +0200
Subject: [PATCH 25/30] fix(es_extended): fix warnings caused by proper type
annotations
---
[core]/es_extended/client/functions.lua | 4 +++-
[core]/es_extended/client/imports/point.lua | 4 ++--
.../es_extended/client/modules/callback.lua | 2 +-
[core]/es_extended/imports.lua | 3 ++-
[core]/es_extended/server/functions.lua | 5 +++--
[core]/es_extended/server/main.lua | 21 +++++++++++++++++++
.../es_extended/server/modules/callback.lua | 2 +-
7 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua
index 6d507e63..953296d2 100644
--- a/[core]/es_extended/client/functions.lua
+++ b/[core]/es_extended/client/functions.lua
@@ -1,4 +1,5 @@
---@return boolean
+---@diagnostic disable-next-line: duplicate-set-field
function ESX.IsPlayerLoaded()
return ESX.PlayerLoaded
end
@@ -559,7 +560,8 @@ function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked)
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))
+ promise:reject(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model))
+ return
end
error(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model))
end
diff --git a/[core]/es_extended/client/imports/point.lua b/[core]/es_extended/client/imports/point.lua
index 5c505cc8..8660569c 100644
--- a/[core]/es_extended/client/imports/point.lua
+++ b/[core]/es_extended/client/imports/point.lua
@@ -1,6 +1,6 @@
local Point = ESX.Class()
-local nearby, loop = {}
+local nearby, loop = {}, nil
function Point:constructor(properties)
self.coords = properties.coords
@@ -23,7 +23,7 @@ function Point:constructor(properties)
point:inside(#(coords - point.coords))
end
end
- Wait()
+ Wait(0)
end
end)
end
diff --git a/[core]/es_extended/client/modules/callback.lua b/[core]/es_extended/client/modules/callback.lua
index 85facbb7..30211b9a 100644
--- a/[core]/es_extended/client/modules/callback.lua
+++ b/[core]/es_extended/client/modules/callback.lua
@@ -92,7 +92,7 @@ end
---@param eventName string
---@param ... any
----@return any
+---@return ...
function ESX.AwaitServerCallback(eventName, ...)
local invokingResource = GetInvokingResource()
local invoker = (invokingResource and invokingResource ~= "unknown") and invokingResource or "es_extended"
diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua
index 0fd7f748..063df85c 100644
--- a/[core]/es_extended/imports.lua
+++ b/[core]/es_extended/imports.lua
@@ -218,9 +218,10 @@ if GetResourceState("ox_lib") == "missing" then
return nil, err or 'unknown error'
end
+ ---@diagnostic disable-next-line: duplicate-doc-alias
---@alias PackageSearcher
---| fun(modName: string): function loader
- ---| fun(modName: string): nil, string errmsg
+ ---| fun(modName: string): nil|false, string errmsg
---@type PackageSearcher[]
package.searchers = {
diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua
index 403aab50..e54e90e7 100644
--- a/[core]/es_extended/server/functions.lua
+++ b/[core]/es_extended/server/functions.lua
@@ -367,16 +367,17 @@ end
---@param source number
---@return boolean
+---@diagnostic disable-next-line: duplicate-set-field
function ESX.IsPlayerLoaded(source)
return ESX.Players[source] ~= nil
end
---@param playerId number | string
----@return string
+---@return string, number
function ESX.GetIdentifier(playerId)
local fxDk = GetConvarInt("sv_fxdkMode", 0)
if fxDk == 1 then
- return "ESX-DEBUG-LICENCE"
+ return "ESX-DEBUG-LICENCE", 0
end
playerId = tostring(playerId)
diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua
index 50fc369b..00efbfac 100644
--- a/[core]/es_extended/server/main.lua
+++ b/[core]/es_extended/server/main.lua
@@ -417,6 +417,10 @@ if not Config.CustomInventory then
if itemType == "item_standard" then
local sourceItem = sourceXPlayer.getInventoryItem(itemName)
+ if not sourceItem then
+ return
+ end
+
if itemCount < 1 or sourceItem.count < itemCount then
return sourceXPlayer.showNotification(TranslateCap("imp_invalid_quantity"))
end
@@ -453,6 +457,10 @@ if not Config.CustomInventory then
end
local _, weapon = sourceXPlayer.getWeapon(itemName)
+ if not weapon then
+ return
+ end
+
local _, weaponObject = ESX.GetWeapon(itemName)
itemCount = weapon.ammo
local weaponComponents = ESX.Table.Clone(weapon.components)
@@ -485,6 +493,9 @@ if not Config.CustomInventory then
end
local _, weapon = sourceXPlayer.getWeapon(itemName)
+ if not weapon then
+ return
+ end
if not targetXPlayer.hasWeapon(itemName) then
sourceXPlayer.showNotification(TranslateCap("gave_weapon_noweapon", targetXPlayer.name))
@@ -517,6 +528,9 @@ if not Config.CustomInventory then
end
local xItem = xPlayer.getInventoryItem(itemName)
+ if not xItem then
+ return
+ end
if itemCount > xItem.count or xItem.count < 1 then
return xPlayer.showNotification(TranslateCap("imp_invalid_quantity"))
@@ -532,6 +546,9 @@ if not Config.CustomInventory then
end
local account = xPlayer.getAccount(itemName)
+ if not account then
+ return
+ end
if itemCount > account.money or account.money < 1 then
return xPlayer.showNotification(TranslateCap("imp_invalid_amount"))
@@ -547,6 +564,10 @@ if not Config.CustomInventory then
if not xPlayer.hasWeapon(itemName) then return end
local _, weapon = xPlayer.getWeapon(itemName)
+ if not weapon then
+ return
+ end
+
local _, weaponObject = ESX.GetWeapon(itemName)
-- luacheck: ignore weaponPickupLabel
local weaponPickupLabel = ""
diff --git a/[core]/es_extended/server/modules/callback.lua b/[core]/es_extended/server/modules/callback.lua
index 1787c420..c0fa8f73 100644
--- a/[core]/es_extended/server/modules/callback.lua
+++ b/[core]/es_extended/server/modules/callback.lua
@@ -98,7 +98,7 @@ end
---@param player number playerId
---@param eventName string
---@param ... any
----@return any
+---@return ...
function ESX.AwaitClientCallback(player, eventName, ...)
local invokingResource = GetInvokingResource()
local invoker = (invokingResource and invokingResource ~= "Unknown") and invokingResource or "es_extended"
From 1a441005a7a537095287f2512c2ff5027f64a55c Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sat, 16 Aug 2025 14:26:08 +0200
Subject: [PATCH 26/30] fix(es_extended/server/functions): xPlayer needs nil
check
---
[core]/es_extended/server/functions.lua | 4 ++--
[core]/es_extended/server/main.lua | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua
index e54e90e7..281efd87 100644
--- a/[core]/es_extended/server/functions.lua
+++ b/[core]/es_extended/server/functions.lua
@@ -348,13 +348,13 @@ function ESX.GetNumPlayers(key, val)
end
---@param source number
----@return xPlayer
+---@return xPlayer?
function ESX.GetPlayerFromId(source)
return ESX.Players[tonumber(source)]
end
---@param identifier string
----@return xPlayer
+---@return xPlayer?
function ESX.GetPlayerFromIdentifier(identifier)
return Core.playersByIdentifier[identifier]
end
diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua
index 00efbfac..103f14b1 100644
--- a/[core]/es_extended/server/main.lua
+++ b/[core]/es_extended/server/main.lua
@@ -522,6 +522,10 @@ if not Config.CustomInventory then
local playerId = source
local xPlayer = ESX.GetPlayerFromId(playerId)
+ if not xPlayer then
+ return
+ end
+
if itemType == "item_standard" then
if not itemCount or itemCount < 1 then
return xPlayer.showNotification(TranslateCap("imp_invalid_quantity"))
@@ -590,6 +594,11 @@ if not Config.CustomInventory then
RegisterNetEvent("esx:useItem", function(itemName)
local source = source
local xPlayer = ESX.GetPlayerFromId(source)
+
+ if not xPlayer then
+ return
+ end
+
local count = xPlayer.getInventoryItem(itemName).count
if count < 1 then
@@ -602,6 +611,10 @@ if not Config.CustomInventory then
RegisterNetEvent("esx:onPickup", function(pickupId)
local pickup, xPlayer, success = Core.Pickups[pickupId], ESX.GetPlayerFromId(source)
+ if not xPlayer then
+ return
+ end
+
if not pickup then return end
local playerPickupDistance = #(pickup.coords - xPlayer.getCoords(true))
@@ -644,6 +657,10 @@ end
ESX.RegisterServerCallback("esx:getPlayerData", function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
+ if not xPlayer then
+ return
+ end
+
cb({
identifier = xPlayer.identifier,
accounts = xPlayer.getAccounts(),
@@ -667,6 +684,10 @@ end)
ESX.RegisterServerCallback("esx:getOtherPlayerData", function(_, cb, target)
local xPlayer = ESX.GetPlayerFromId(target)
+ if not xPlayer then
+ return
+ end
+
cb({
identifier = xPlayer.identifier,
accounts = xPlayer.getAccounts(),
From ec49a12410dccee38c0a02da912f9bc16779f080 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sat, 16 Aug 2025 23:35:36 +0200
Subject: [PATCH 27/30] refactor(es_extended/server/functions): fix return type
for GetExtendedPlayers
---
[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 281efd87..acfcb1ec 100644
--- a/[core]/es_extended/server/functions.lua
+++ b/[core]/es_extended/server/functions.lua
@@ -292,7 +292,7 @@ end
---@param key? string
---@param val? string|table
----@return table
+---@return xPlayer[]|table
function ESX.GetExtendedPlayers(key, val)
if not key then
return ESX.Table.ToArray(ESX.Players)
From 9333c1e9e0a3cc3462bdd4c0d235f699ebc75846 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sun, 17 Aug 2025 15:03:38 +0200
Subject: [PATCH 28/30] refactor(es_extended/server/classes/player): Add SSN
field and getter to player class
---
[core]/es_extended/server/classes/player.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua
index b61846a0..a9bc130b 100644
--- a/[core]/es_extended/server/classes/player.lua
+++ b/[core]/es_extended/server/classes/player.lua
@@ -48,6 +48,7 @@
---@field coords table # Player's coordinates {x, y, z, heading}.
---@field group string # Player permission group.
---@field identifier string # Unique identifier (usually Steam or license).
+---@field ssn string # Player's social security number.
---@field license string # Player license string.
---@field inventory ESXInventoryItem[] # Player's inventory items.
---@field job ESXJob # Player's current job.
@@ -105,6 +106,7 @@
---@field getWeaponTint fun(weaponName: string): number # Get weapon tint.
--- Player State Functions
---@field getIdentifier fun(): string # Get player's unique identifier.
+---@field getSSN fun(): string # Get player's social security number.
---@field getSource fun(): number # Get player source/server ID.
---@field getPlayerId fun(): number # Alias for getSource.
---@field getName fun(): string # Get player's name.
@@ -263,11 +265,10 @@ function CreateExtendedPlayer(playerId, identifier, ssn, group, accounts, invent
return self.identifier
end
- ---@return string
function self.getSSN()
return self.ssn
end
-
+
function self.setGroup(newGroup)
local lastGroup = self.group
From 276a49f77ef3b80593056aa8de15ea6b9f3b2661 Mon Sep 17 00:00:00 2001
From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com>
Date: Sun, 17 Aug 2025 15:59:01 +0200
Subject: [PATCH 29/30] feat(es_extended): add static ESX.ExtendedPlayers
As a wrapper for ESX.GetExtendedPlayers
---
[core]/es_extended/imports.lua | 62 +++++++++++++++-----
[core]/es_extended/server/classes/player.lua | 43 +++++++-------
[core]/es_extended/server/functions.lua | 26 +++++---
3 files changed, 88 insertions(+), 43 deletions(-)
diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua
index 063df85c..95797ba6 100644
--- a/[core]/es_extended/imports.lua
+++ b/[core]/es_extended/imports.lua
@@ -106,26 +106,56 @@ if not IsDuplicityVersion() then -- Only register this event for the client
end
end
else
- ESX.Player = setmetatable({}, {
- __call = function(_, src)
- if type(src) ~= "number" then
- src = ESX.GetPlayerIdFromIdentifier(src)
- if not src then
- return
+ ---@param src number
+ ---@return StaticPlayer
+ local function createStaticPlayer(src)
+ return setmetatable({ src = src }, {
+ __index = function(self, method)
+ return function(...)
+ return exports.es_extended:RunStaticPlayerMethod(self.src, method, ...)
end
- elseif not ESX.IsPlayerLoaded(src) then
- return
end
+ })
+ end
- return setmetatable({ src = src }, {
- __index = function(self, method)
- return function(...)
- return exports.es_extended:RunStaticPlayerMethod(self.src, method, ...)
- end
- end
- })
+ ---@param src number|string
+ ---@return StaticPlayer?
+ function ESX.Player(src)
+ if type(src) ~= "number" then
+ src = ESX.GetPlayerIdFromIdentifier(src)
+ if not src then return end
+ elseif not ESX.IsPlayerLoaded(src) then
+ return
end
- })
+
+ return createStaticPlayer(src)
+ end
+
+ ---@param key? string
+ ---@param val? string|string[]
+ ---@return StaticPlayer[] | table
+ function ESX.ExtendedPlayers(key, val)
+ local playerIds = ESX.GetExtendedPlayers(key, val, true)
+
+ if key and type(val) == "table" then
+ ---@cast playerIds table
+ local retVal = {}
+ for group, ids in pairs(playerIds) do
+ retVal[group] = {}
+ for i = 1, #ids do
+ retVal[group][i] = createStaticPlayer(ids[i])
+ end
+ end
+ return retVal
+ else
+ ---@cast playerIds number[]
+ local retVal = {}
+ for i = 1, #playerIds do
+ retVal[i] = createStaticPlayer(playerIds[i])
+ end
+ return retVal
+ 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 3d5f0cd6..d47da7dc 100644
--- a/[core]/es_extended/server/classes/player.lua
+++ b/[core]/es_extended/server/classes/player.lua
@@ -42,26 +42,7 @@
---@field label string # Component display name.
---@field hash string|number # Component hash or identifier.
----@class xPlayer
---- Properties
----@field accounts ESXAccount[] # Array of the player's accounts.
----@field coords table # Player's coordinates {x, y, z, heading}.
----@field group string # Player permission group.
----@field identifier string # Unique identifier (usually Steam or license).
----@field license string # Player license string.
----@field inventory ESXInventoryItem[] # Player's inventory items.
----@field job ESXJob # Player's current job.
----@field loadout ESXInventoryWeapon[] # Player's current weapons.
----@field name string # Player's display name.
----@field playerId number # Player's ID (server ID).
----@field source number # Player's source (alias for playerId).
----@field variables table # Custom player variables.
----@field weight number # Current carried weight.
----@field maxWeight number # Maximum carry weight.
----@field metadata table # Custom metadata table.
----@field lastPlaytime number # Last recorded playtime in seconds.
----@field paycheckEnabled boolean # Whether paycheck is enabled.
----@field admin boolean # Whether the player is an admin.
+---@class StaticPlayer
--- Money Functions
---@field setMoney fun(money: number) # Set player's cash balance.
---@field getMoney fun(): number # Get player's current cash balance.
@@ -130,6 +111,28 @@
---@field executeCommand fun(command: string) # Execute a server command.
---@field triggerEvent fun(eventName: string, ...) # Trigger client event for this player.
+
+---@class xPlayer:StaticPlayer
+--- Properties
+---@field accounts ESXAccount[] # Array of the player's accounts.
+---@field coords table # Player's coordinates {x, y, z, heading}.
+---@field group string # Player permission group.
+---@field identifier string # Unique identifier (usually Steam or license).
+---@field license string # Player license string.
+---@field inventory ESXInventoryItem[] # Player's inventory items.
+---@field job ESXJob # Player's current job.
+---@field loadout ESXInventoryWeapon[] # Player's current weapons.
+---@field name string # Player's display name.
+---@field playerId number # Player's ID (server ID).
+---@field source number # Player's source (alias for playerId).
+---@field variables table # Custom player variables.
+---@field weight number # Current carried weight.
+---@field maxWeight number # Maximum carry weight.
+---@field metadata table # Custom metadata table.
+---@field lastPlaytime number # Last recorded playtime in seconds.
+---@field paycheckEnabled boolean # Whether paycheck is enabled.
+---@field admin boolean # Whether the player is an admin.
+
---@param playerId number
---@param identifier string
---@param group string
diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua
index 1596964f..30215d67 100644
--- a/[core]/es_extended/server/functions.lua
+++ b/[core]/es_extended/server/functions.lua
@@ -277,7 +277,7 @@ end
ESX.GetPlayers = GetPlayers
-local function checkTable(key, val, xPlayer, xPlayers)
+local function checkTable(key, val, xPlayer, xPlayers, minimal)
for valIndex = 1, #val do
local value = val[valIndex]
if not xPlayers[value] then
@@ -285,23 +285,35 @@ local function checkTable(key, val, xPlayer, xPlayers)
end
if (key == "job" and xPlayer.job.name == value) or xPlayer[key] == value then
- xPlayers[value][#xPlayers[value] + 1] = xPlayer
+ xPlayers[value][#xPlayers[value] + 1] = (minimal and xPlayer.source or xPlayer)
end
end
end
---@param key? string
---@param val? string|table
----@return xPlayer[]|table
-function ESX.GetExtendedPlayers(key, val)
+---@param minimal? boolean
+---@return xPlayer[]|number[]|table|table
+function ESX.GetExtendedPlayers(key, val, minimal)
if not key then
- return ESX.Table.ToArray(ESX.Players)
+ if not minimal then
+ return ESX.Table.ToArray(ESX.Players)
+ end
+
+ local xPlayers = {}
+ local index = 1
+ for src, _ in pairs(ESX.Players) do
+ xPlayers[index] = src
+ index += 1
+ end
+
+ return xPlayers
end
local xPlayers = {}
if type(val) == "table" then
for _, xPlayer in pairs(ESX.Players) do
- checkTable(key, val, xPlayer, xPlayers)
+ checkTable(key, val, xPlayer, xPlayers, minimal)
end
return xPlayers
@@ -309,7 +321,7 @@ function ESX.GetExtendedPlayers(key, val)
for _, xPlayer in pairs(ESX.Players) do
if (key == "job" and xPlayer.job.name == val) or xPlayer[key] == val then
- xPlayers[#xPlayers + 1] = xPlayer
+ xPlayers[#xPlayers + 1] = (minimal and xPlayer.source or xPlayer)
end
end
From 73ccea1b4e23e5f5e8fb91fffe66a5e2777ae2cb Mon Sep 17 00:00:00 2001
From: Manifest Bumper <41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 19 Aug 2025 22:39:13 +0000
Subject: [PATCH 30/30] chore: bump manifest version to 1.13.3
---
[core]/cron/fxmanifest.lua | 2 +-
[core]/es_extended/fxmanifest.lua | 2 +-
[core]/esx_chat_theme/fxmanifest.lua | 2 +-
[core]/esx_context/fxmanifest.lua | 2 +-
[core]/esx_identity/fxmanifest.lua | 2 +-
[core]/esx_inventory/fxmanifest.lua | 2 +-
[core]/esx_loadingscreen/fxmanifest.lua | 2 +-
[core]/esx_menu_default/fxmanifest.lua | 2 +-
[core]/esx_menu_dialog/fxmanifest.lua | 2 +-
[core]/esx_menu_list/fxmanifest.lua | 2 +-
[core]/esx_multicharacter/fxmanifest.lua | 2 +-
[core]/esx_notify/fxmanifest.lua | 2 +-
[core]/esx_progressbar/fxmanifest.lua | 2 +-
[core]/esx_skin/fxmanifest.lua | 2 +-
[core]/esx_textui/fxmanifest.lua | 2 +-
[core]/skinchanger/fxmanifest.lua | 2 +-
16 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/[core]/cron/fxmanifest.lua b/[core]/cron/fxmanifest.lua
index 85fa877a..aa832062 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.13.2'
+version '1.13.3'
server_script 'server/main.lua'
diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua
index 74545f8d..4171d44a 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.13.2'
+version '1.13.3'
shared_scripts {
'locale.lua',
diff --git a/[core]/esx_chat_theme/fxmanifest.lua b/[core]/esx_chat_theme/fxmanifest.lua
index c12d3c9b..b1d9e362 100644
--- a/[core]/esx_chat_theme/fxmanifest.lua
+++ b/[core]/esx_chat_theme/fxmanifest.lua
@@ -1,4 +1,4 @@
-version '1.13.2'
+version '1.13.3'
author 'ESX-Framework'
description 'A ESX Stylised theme for the chat resource.'
diff --git a/[core]/esx_context/fxmanifest.lua b/[core]/esx_context/fxmanifest.lua
index b6668179..349f294c 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.13.2'
+version '1.13.3'
ui_page 'index.html'
diff --git a/[core]/esx_identity/fxmanifest.lua b/[core]/esx_identity/fxmanifest.lua
index c26e72af..4f7b7631 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.13.2'
+version '1.13.3'
shared_scripts {
'@es_extended/imports.lua',
diff --git a/[core]/esx_inventory/fxmanifest.lua b/[core]/esx_inventory/fxmanifest.lua
index 87a97468..ecc61660 100644
--- a/[core]/esx_inventory/fxmanifest.lua
+++ b/[core]/esx_inventory/fxmanifest.lua
@@ -4,7 +4,7 @@ game "gta5"
description "Inventory for the ESX framework"
lua54 "yes"
use_fxv2_oal "yes"
-version '1.13.2'
+version '1.13.3'
shared_scripts {
"/config/main.lua",
diff --git a/[core]/esx_loadingscreen/fxmanifest.lua b/[core]/esx_loadingscreen/fxmanifest.lua
index cb6cad11..94523743 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.13.2'
+version '1.13.3'
lua54 'yes'
loadscreen 'index.html'
diff --git a/[core]/esx_menu_default/fxmanifest.lua b/[core]/esx_menu_default/fxmanifest.lua
index 133a08f6..7138171c 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.13.2'
+version '1.13.3'
client_scripts { '@es_extended/imports.lua', 'client/main.lua' }
diff --git a/[core]/esx_menu_dialog/fxmanifest.lua b/[core]/esx_menu_dialog/fxmanifest.lua
index 182c6f81..f5e61e14 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.13.2'
+version '1.13.3'
client_scripts {
'@es_extended/imports.lua',
diff --git a/[core]/esx_menu_list/fxmanifest.lua b/[core]/esx_menu_list/fxmanifest.lua
index edd0b0c2..5350c903 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.13.2'
+version '1.13.3'
client_scripts {
diff --git a/[core]/esx_multicharacter/fxmanifest.lua b/[core]/esx_multicharacter/fxmanifest.lua
index 26cbc8e1..540adc6e 100644
--- a/[core]/esx_multicharacter/fxmanifest.lua
+++ b/[core]/esx_multicharacter/fxmanifest.lua
@@ -2,7 +2,7 @@ fx_version 'cerulean'
game 'gta5'
author 'ESX-Framework - Linden - KASH'
description 'Allows players to have multiple characters on the same account.'
-version '1.13.2'
+version '1.13.3'
lua54 'yes'
dependencies { 'es_extended', 'esx_context', 'esx_identity', 'esx_skin' }
diff --git a/[core]/esx_notify/fxmanifest.lua b/[core]/esx_notify/fxmanifest.lua
index 41325249..647d07a7 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.13.2'
+version '1.13.3'
author 'ESX-Framework'
description 'A beautiful and simple NUI notification system for ESX'
diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[core]/esx_progressbar/fxmanifest.lua
index d3e2020f..c96995a4 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.13.2'
+version '1.13.3'
lua54 'yes'
client_scripts { 'Progress.lua' }
diff --git a/[core]/esx_skin/fxmanifest.lua b/[core]/esx_skin/fxmanifest.lua
index a44bf801..34e123c4 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.13.2'
+version '1.13.3'
lua54 'yes'
shared_scripts {
diff --git a/[core]/esx_textui/fxmanifest.lua b/[core]/esx_textui/fxmanifest.lua
index 857ec2ef..54f45994 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.13.2'
+version '1.13.3'
lua54 'yes'
client_scripts { 'TextUI.lua' }
diff --git a/[core]/skinchanger/fxmanifest.lua b/[core]/skinchanger/fxmanifest.lua
index b5e3e957..2b97b217 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.13.2'
+version '1.13.3'
lua54 'yes'
client_scripts {