zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_butcherknife.lua
2014-10-01 20:49:54 -04:00

62 lines
2 KiB
Lua

AddCSLuaFile()
if CLIENT then
SWEP.PrintName = "Butcher Knife"
SWEP.ViewModelFOV = 55
SWEP.ViewModelFlip = false
SWEP.ShowViewModel = false
SWEP.ShowWorldModel = false
SWEP.VElements = {
["base"] = { type = "Model", model = "models/props_lab/cleaver.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(3, 1, -1), angle = Angle(90, 0, 0), size = Vector(0.8, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }
}
SWEP.WElements = {
["base"] = { type = "Model", model = "models/props_lab/cleaver.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(3, 1, -3.182), angle = Angle(90, 0, 0), size = Vector(0.8, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }
}
end
SWEP.Base = "weapon_zs_basemelee"
SWEP.DamageType = DMG_SLASH
SWEP.ViewModel = "models/weapons/c_crowbar.mdl"
SWEP.WorldModel = "models/weapons/w_crowbar.mdl"
SWEP.UseHands = true
SWEP.NoDroppedWorldModel = true
--[[SWEP.BoxPhysicsMax = Vector(8, 1, 4)
SWEP.BoxPhysicsMin = Vector(-8, -1, -4)]]
SWEP.MeleeDamage = 40
SWEP.MeleeRange = 48
SWEP.MeleeSize = 0.875
SWEP.Primary.Delay = 0.7
SWEP.WalkSpeed = SPEED_FAST
SWEP.UseMelee1 = true
SWEP.HitGesture = ACT_HL2MP_GESTURE_RANGE_ATTACK_MELEE
SWEP.MissGesture = SWEP.HitGesture
SWEP.HitDecal = "Manhackcut"
SWEP.HitAnim = ACT_VM_MISSCENTER
function SWEP:PlaySwingSound()
self:EmitSound("weapons/knife/knife_slash"..math.random(2)..".wav", 72, math.Rand(85, 95))
end
function SWEP:PlayHitSound()
self:EmitSound("weapons/knife/knife_hitwall1.wav", 72, math.Rand(75, 85))
end
function SWEP:PlayHitFleshSound()
self:EmitSound("physics/flesh/flesh_squishy_impact_hard"..math.random(4)..".wav")
self:EmitSound("physics/body/body_medium_break"..math.random(2, 4)..".wav")
end
function SWEP:PostOnMeleeHit(hitent, hitflesh, tr)
if hitent:IsValid() and hitent:IsPlayer() and hitent:Health() <= 0 then
-- Dismember closest limb to tr.HitPos
end
end