Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- local Guns = {}
- local RandomStats = {}
- RandomStats[1] = {class = "weapon_ttt_m16", dmg = 40, recoil = math.random(1.3,1.8) }
- --RandomStats = {dmg = math.random(8, 16), recoil = math.random(0.7,1.2) }
- --RandomStats = {dmg = math.random(8, 16), recoil = math.random(0.7,1.2) }
- local function WeaponStatChanger()
- timer.Simple(3, function()
- for k, v in pairs( ents.GetAll() ) do
- local class = string.lower(v:GetClass())
- if string.sub( class, 1, 10 ) == "weapon_ttt" or "weapon_zm" then
- --print("Inserted weapon into the TTT table "..v:GetClass())
- table.insert(Guns, v)
- end
- end
- for k, wep in pairs(Guns) do
- if wep.Primary then
- print("YUUUP ITS A WEAPON "..wep:GetClass())
- print(tostring(wep.Primary.Damage))
- wep.Primary.Damage = 50
- print(tostring(wep.Primary.Damage))
- print("CHANGED DAMAGE")
- end
- end
- end)
- end
- hook.Add( "InitPostEntity", "Thing2", WeaponStatChanger )
- --hook.Add( "TTTPrepareRound", "Thing3", function()
- -- hook.Call( "InitPostEntity" )
- --end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement