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

43 lines
934 B
Lua
Raw Normal View History

2014-10-02 08:49:54 +08:00
AddCSLuaFile()
SWEP.PrintName = "The Tickle Monster"
2014-10-02 08:49:54 +08:00
SWEP.Base = "weapon_zs_zombie"
SWEP.MeleeDamage = 24
SWEP.MeleeDamageVsProps = 28
SWEP.MeleeReach = 150
2014-10-02 08:49:54 +08:00
SWEP.MeleeSize = 5
function SWEP:Reload()
self:SecondaryAttack()
end
function SWEP:MeleeHit(ent, trace, damage, forcescale)
if not ent:IsPlayer() then
damage = self.MeleeDamageVsProps
end
self.BaseClass.MeleeHit(self, ent, trace, damage, forcescale)
end
2014-10-02 08:49:54 +08:00
function SWEP:PlayAlertSound()
self:GetOwner():EmitSound("npc/barnacle/barnacle_tongue_pull"..math.random(3)..".wav")
2014-10-02 08:49:54 +08:00
end
SWEP.PlayIdleSound = SWEP.PlayAlertSound
function SWEP:PlayAttackSound()
self:EmitSound("npc/barnacle/barnacle_bark"..math.random(2)..".wav")
2014-10-02 08:49:54 +08:00
end
if not CLIENT then return end
function SWEP:ViewModelDrawn()
render.ModelMaterialOverride(0)
end
local matSheet = Material("Models/Charple/Charple1_sheet")
function SWEP:PreDrawViewModel(vm)
render.ModelMaterialOverride(matSheet)
end