Changing Variable by using variable+string? LUA
snippet in lua

Changing Variable by using variable+string? LUA

user8681

-- gun list
UMP45 = {Ammo = false, Fov = false}
AKMA = {Ammo = false, Fov = false}

cgun = UMP45  -- set current gun
print(cgun.Ammo)

cgun.Ammo = true -- set Ammo of current gun
print(cgun.Ammo)