How would I correctly access this table?
FireConfig = { -- i am trying to access the fireconfig table to change the firerate
FireRate = 360,
InternalMag = false,
InternalMagSize = 0,
CanOneInTheChamber = false,
Damage = 17,
BurstCount = 3,
PelletCount = 1,
MuzzleVelocity = 1050,
DamageFallOff = {
StartsAt = 90,
LowestAt = 150,
FinalMod = 0.2353
}
}
-- gun mods functions
local function modgun(gun, property, mult)
if guns.apply_to_all ~= true then
if gun and property and mult then
if type(mult) == 'number' then
guns.data[gun][property] = guns.copydata[gun][property] * mult
elseif type(mult) == 'boolean' then
guns.data[gun][property] = mult
elseif type(mult) == 'string' then
guns.data[gun][property] = mult
end
end
else
for i, _ in next, guns.data do
if guns.data[i][property] then
if type(mult) == 'number' then
guns.data[i][property] = guns.copydata[i][property] * mult
elseif type(mult) == 'boolean' then
guns.data[i][property] = mult
elseif type(mult) == 'string' then
guns.data[i][property] = mult
end
end
end
end
end
-- how do I call to change the FireRate
modgun(guns.gunname, 'FireRate', (value_firerate)) -- how do I correctly access the fireconfig table which has the value of firerate?