zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_sledgehammer.lua

52 lines
1.3 KiB
Lua
Raw Normal View History

2014-10-02 08:49:54 +08:00
AddCSLuaFile()
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
SWEP.ViewModel = "models/weapons/v_sledgehammer/c_sledgehammer.mdl"
2014-10-02 08:49:54 +08:00
SWEP.WorldModel = "models/weapons/w_sledgehammer.mdl"
SWEP.UseHands = true
2014-10-02 08:49:54 +08:00
SWEP.MeleeDamage = 75
SWEP.MeleeRange = 64
SWEP.MeleeSize = 1.75
SWEP.MeleeKnockBack = 270
2014-10-02 08:49:54 +08:00
SWEP.Primary.Delay = 1.3
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"
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