mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 02:38:53 +00:00
Add xPlayer.getMaxWeight() (#559)
* Add xPlayer.getMaxWeight() Add ability to read current maximum weight for player * Remove the tab indent
This commit is contained in:
@@ -265,6 +265,10 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
return inventoryWeight
|
||||
end
|
||||
|
||||
self.getMaxWeight = function()
|
||||
return self.maxWeight
|
||||
end
|
||||
|
||||
self.canCarryItem = function(name, count)
|
||||
local currentWeight, itemWeight = self.getWeight(), ESX.Items[name].weight
|
||||
local newWeight = currentWeight + (itemWeight * count)
|
||||
|
||||
Reference in New Issue
Block a user