2014-10-02 08:49:54 +08:00
|
|
|
AddCSLuaFile()
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.PrintName = "Sledgehammer"
|
|
|
|
SWEP.Description = "A heavy, but powerful melee weapon. A target struck by the force of it will receive considerable knockback."
|
|
|
|
|
2014-10-02 08:49:54 +08:00
|
|
|
if CLIENT then
|
|
|
|
SWEP.ViewModelFOV = 75
|
|
|
|
end
|
|
|
|
|
|
|
|
SWEP.Base = "weapon_zs_basemelee"
|
|
|
|
|
|
|
|
SWEP.HoldType = "melee2"
|
|
|
|
|
|
|
|
SWEP.DamageType = DMG_CLUB
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.ViewModel = "models/weapons/v_sledgehammer/c_sledgehammer.mdl"
|
2014-10-02 08:49:54 +08:00
|
|
|
SWEP.WorldModel = "models/weapons/w_sledgehammer.mdl"
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.UseHands = true
|
2014-10-02 08:49:54 +08:00
|
|
|
|
|
|
|
SWEP.MeleeDamage = 75
|
|
|
|
SWEP.MeleeRange = 64
|
|
|
|
SWEP.MeleeSize = 1.75
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.MeleeKnockBack = 270
|
2014-10-02 08:49:54 +08:00
|
|
|
|
|
|
|
SWEP.Primary.Delay = 1.3
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.Tier = 2
|
|
|
|
|
2014-10-02 08:49:54 +08:00
|
|
|
SWEP.WalkSpeed = SPEED_SLOWEST
|
|
|
|
|
|
|
|
SWEP.SwingRotation = Angle(60, 0, -80)
|
|
|
|
SWEP.SwingOffset = Vector(0, -30, 0)
|
|
|
|
SWEP.SwingTime = 0.75
|
|
|
|
SWEP.SwingHoldType = "melee"
|
|
|
|
|
2018-05-02 06:32:59 +08:00
|
|
|
SWEP.AllowQualityWeapons = true
|
|
|
|
|
|
|
|
GAMEMODE:AttachWeaponModifier(SWEP, WEAPON_MODIFIER_MELEE_IMPACT_DELAY, -0.1, 1)
|
|
|
|
GAMEMODE:AttachWeaponModifier(SWEP, WEAPON_MODIFIER_FIRE_DELAY, -0.1, 1)
|
|
|
|
|
2014-10-02 08:49:54 +08:00
|
|
|
function SWEP:PlaySwingSound()
|
|
|
|
self:EmitSound("weapons/iceaxe/iceaxe_swing1.wav", 75, math.random(35, 45))
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:PlayHitSound()
|
|
|
|
self:EmitSound("physics/metal/metal_canister_impact_hard"..math.random(3)..".wav", 75, math.Rand(86, 90))
|
|
|
|
end
|
|
|
|
|
|
|
|
function SWEP:PlayHitFleshSound()
|
|
|
|
self:EmitSound("physics/body/body_medium_break"..math.random(2, 4)..".wav", 75, math.Rand(86, 90))
|
|
|
|
end
|