mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
Sync consumed ammo with server properly
No more security issues here!
This commit is contained in:
@@ -367,6 +367,16 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
end
|
||||
end
|
||||
|
||||
self.updateWeaponAmmo = function(weaponName, ammoCount)
|
||||
local loadoutNum, weapon = self.getWeapon(weaponName)
|
||||
|
||||
if weapon then
|
||||
if ammoCount < weapon.ammo then
|
||||
weapon.ammo = ammoCount
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self.setWeaponTint = function(weaponName, weaponTintIndex)
|
||||
local loadoutNum, weapon = self.getWeapon(weaponName)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user