mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
@@ -270,6 +270,15 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
|
||||
return newWeight <= self.maxWeight
|
||||
end
|
||||
|
||||
self.maxCarryItem = function(name)
|
||||
local count = 0
|
||||
local currentWeight, itemWeight = self.getWeight(), ESX.Items[name].weight
|
||||
local newWeight = self.maxWeight - currentWeight
|
||||
|
||||
-- math.max(0, ... to prevent bad programmers
|
||||
return math.max(0, math.floor(newWeight / itemWeight))
|
||||
end
|
||||
|
||||
self.canSwapItem = function(firstItem, firstItemCount, testItem, testItemCount)
|
||||
local firstItemObject = self.getInventoryItem(firstItem)
|
||||
@@ -317,7 +326,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
else
|
||||
self.job.skin_female = {}
|
||||
end
|
||||
|
||||
|
||||
TriggerEvent('esx:setJob', self.source, self.job, lastJob)
|
||||
self.triggerEvent('esx:setJob', self.job)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user