Advertisement
Leystryku

TTT Weapon Fix

Mar 31st, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. if(SERVER)  then AddCSLuaFile() end
  2.  
  3. local newDampenDrop = function(self)
  4.    local phys = self:GetPhysicsObject()
  5.    if IsValid(phys) then
  6.       phys:SetVelocityInstantaneous(Vector(0,0,-75) + phys:GetVelocity() * 0.001)
  7.       phys:AddAngleVelocity(phys:GetAngleVelocity() * -0.99)
  8.    end
  9. end
  10.  
  11. timer.Simple(1, function()
  12.  
  13.    local pistols = {"gdcw_dgal50", "gdcw_cm1911", "usp45"}
  14.  
  15.    for k,v in pairs(weapons.GetList()) do
  16.       if(string.find(v.ClassName, "_ttt_") or string.find(v.ClassName, "_zm_")) then continue end
  17.  
  18.       if(not v.DampenDrop) then
  19.          v.DampenDrop = newDampenDrop
  20.          v.IsEquipment = function() return false end
  21.          v.GetHeadshotMultiplier = function() return nil end
  22.  
  23.          v.Slot = 2
  24.          v.Kind = WEAPON_HEAVY
  25.  
  26.          for _,pistname in pairs(pistols) do
  27.             if(string.find(v.ClassName,pistname)) then
  28.                v.Kind = WEAPON_PISTOL
  29.                v.Slot = 1
  30.             end
  31.          end
  32.       end
  33.  
  34.    end
  35.  
  36.  
  37.  
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement