Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile("hands.lua")
- SWEP.ViewModel = "models/Weapons/V_hands.mdl"
- SWEP.WorldModel = "models/weapons/w_pist_usp.mdl"
- SWEP.HoldType = "fist"
- SWEP.Primary.ClipSize = -1
- SWEP.Primary.DefaultClip = -1
- SWEP.Primary.Automatic = true
- SWEP.Primary.Ammo = "none"
- SWEP.Secondary.Clipsize = -1
- SWEP.Secondary.DefaultClip = -1
- SWEP.Secondary.Automatic = false
- SWEP.Secondary.Ammo = "none"
- SWEP.DrawAmmo = false
- SWEP.DrawCrosshair = false
- function SWEP:Initialize()
- self:SetWeaponHoldType("fist")
- self.Owner.CD1 = CurTime()
- end
- function SWEP:ShouldDropOnDie()
- return false
- end
- function SWEP:Think()
- end
- function SWEP:Reload()
- end
- local Box = Vector(16,16,16)
- function SWEP:PrimaryAttack()
- if (CLIENT and !IsFirstTimePredicted()) then return end
- if (self.Owner.CD1 and self.Owner.CD1 > CurTime()) then return end
- self.Owner:SetAnimation( PLAYER_ATTACK1 )
- if (SERVER) then
- local Trace = {
- start = self.Owner:GetShootPos(),
- endpos = self.Owner:GetShootPos()+self.Owner:GetAimVector()*30,
- filter = self.Owner,
- mins = Box*-1,
- maxs = Box,
- }
- local Tr = util.TraceHull(Trace)
- if (ValidEntity(Tr.Entity)) then
- Tr.Entity:SetVelocity(self.Owner:GetAimVector()*200)
- Tr.Entity:EmitSound("player/taunt_chest_thump.wav",100,math.random(90,110))
- else
- self.Owner:EmitSound("weapons/iceaxe/iceaxe_swing1.wav")
- end
- end
- self.Owner.CD1 = CurTime()+0.2
- end
- function SWEP:SecondaryAttack()
- end
Add Comment
Please, Sign In to add comment