mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Breaking changes: implemented global weight inventory system, read description before updating!
- Fixed #256 - Implements #173 __NO OFFICIAL ESX SCRIPT WILL WORK WITH THIS AT THE MOMENT__ This commit will break your entire ESX if you dont use the new SQL format, follow the new one if you want it all to work properly. Scripts using `item.limit` will break too, instead use `xPlayer.canCarryItem(item, count)`
This commit is contained in:
+16
-16
@@ -1,14 +1,14 @@
|
||||
ESX = {}
|
||||
ESX.Players = {}
|
||||
ESX = {}
|
||||
ESX.Players = {}
|
||||
ESX.UsableItemsCallbacks = {}
|
||||
ESX.Items = {}
|
||||
ESX.ServerCallbacks = {}
|
||||
ESX.TimeoutCount = -1
|
||||
ESX.CancelledTimeouts = {}
|
||||
ESX.LastPlayerData = {}
|
||||
ESX.Pickups = {}
|
||||
ESX.PickupId = 0
|
||||
ESX.Jobs = {}
|
||||
ESX.Items = {}
|
||||
ESX.ServerCallbacks = {}
|
||||
ESX.TimeoutCount = -1
|
||||
ESX.CancelledTimeouts = {}
|
||||
ESX.LastPlayerData = {}
|
||||
ESX.Pickups = {}
|
||||
ESX.PickupId = 0
|
||||
ESX.Jobs = {}
|
||||
|
||||
AddEventHandler('esx:getSharedObject', function(cb)
|
||||
cb(ESX)
|
||||
@@ -20,12 +20,12 @@ end
|
||||
|
||||
MySQL.ready(function()
|
||||
MySQL.Async.fetchAll('SELECT * FROM items', {}, function(result)
|
||||
for i=1, #result, 1 do
|
||||
ESX.Items[result[i].name] = {
|
||||
label = result[i].label,
|
||||
limit = result[i].limit,
|
||||
rare = (result[i].rare == 1 and true or false),
|
||||
canRemove = (result[i].can_remove == 1 and true or false),
|
||||
for k,v in ipairs(result) do
|
||||
ESX.Items[v.name] = {
|
||||
label = v.label,
|
||||
weight = v.weight,
|
||||
rare = v.rare,
|
||||
canRemove = v.can_remove
|
||||
}
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user