Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- --[[
- local RandomStats = {}
- local function RandomizeStats()
- RandomStats["weapon_ttt_m16"] = {dmg = math.random(16, 28), recoil = math.random(1.3,1.8) }
- RandomStats["weapon_ttt_glock"] = {dmg = math.random(8, 16), recoil = math.random(0.7,1.2) }
- RandomStats["weapon_zm_mac10"] = {dmg = math.random(8, 16), recoil = math.random(0.7,1.2) }
- end
- local function WeaponStatChanger()
- for k, v in pairs( ents.GetAll() ) do
- RandomizeStats()
- print("ENTITIES -- "..v:GetClass())
- for key, tableClass in pairs ( RandomStats ) do
- local class = v:GetClass()
- if class == tableClass then
- local wep = v
- print("Gun match - " ..class)
- print("Old Damage " .. wep.Primary.Damage)
- wep.Primary.Damage = RandomStats[class][1]
- wep.Primary.Recoil = RandomStats[class][2]
- print("New damage " .. wep.Primary.Damage)
- print("New values set")
- end
- end
- end
- end
- hook.Add( "InitPostEntity", "Thing", WeaponStatChanger )
- ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement