Sync consumed ammo with server properly

No more security issues here!
This commit is contained in:
ElPumpo
2020-03-22 09:43:43 +01:00
parent ff9930068f
commit 9a1dfa42ca
4 changed files with 48 additions and 56 deletions
+10
View File
@@ -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)