wpTable = {
["16"] = 4,
["17"] = 4,
["22"] = 1000,
["23"] = 1000,
["24"] = 1000,
["25"] = 1000,
["26"] = 1000,
["27"] = 1000,
["28"] = 1200,
["29"] = 1200,
["30"] = 2000,
["31"] = 2000,
["32"] = 1200,
["33"] = 1000,
["34"] = 1000,
}
function CheckBug()
for i, player in ipairs(getElementsByType("player")) do
for slot=2, 8 do
local wpID = getPedWeapon(player, slot)
local wpLimit = tonumber(wpTable[tostring(wpID)])
if wpID and wpID > 0 and wpLimit then
if getPedTotalAmmo(player, slot) > wpLimit then
setWeaponAmmo(player, wpID, wpLimit)
end
end
end
end
end
setTimer(CheckBug, 1000, 0)