Advertisement
Exho

Untitled

Aug 22nd, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. AddCSLuaFile()
  2.  
  3. local Guns = {}
  4. local RandomStats = {}
  5. RandomStats[1] = {class = "weapon_ttt_m16", dmg = 40, recoil = math.random(1.3,1.8) }
  6. --RandomStats = {dmg = math.random(8, 16), recoil = math.random(0.7,1.2) }
  7. --RandomStats = {dmg = math.random(8, 16), recoil = math.random(0.7,1.2) }
  8.  
  9. local function WeaponStatChanger()
  10. timer.Simple(3, function()
  11. for k, v in pairs( ents.GetAll() ) do
  12. local class = string.lower(v:GetClass())
  13. if string.sub( class, 1, 10 ) == "weapon_ttt" or "weapon_zm" then
  14. --print("Inserted weapon into the TTT table "..v:GetClass())
  15. table.insert(Guns, v)
  16. end
  17. end
  18.  
  19. for k, wep in pairs(Guns) do
  20. if wep.Primary then
  21. print("YUUUP ITS A WEAPON "..wep:GetClass())
  22. print(tostring(wep.Primary.Damage))
  23. wep.Primary.Damage = 50
  24. print(tostring(wep.Primary.Damage))
  25. print("CHANGED DAMAGE")
  26. end
  27. end
  28. end)
  29. end
  30. hook.Add( "InitPostEntity", "Thing2", WeaponStatChanger )
  31. --hook.Add( "TTTPrepareRound", "Thing3", function()
  32. -- hook.Call( "InitPostEntity" )
  33. --end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement