diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-12-28 18:46:17 -0600 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-12-28 18:46:17 -0600 |
| commit | 0ceb38e8a1f26716fe4756c1cfbdbbedd1fae5f1 (patch) | |
| tree | 6f9d24d0785a913e2baa38fec3a24d5dfb4d1d1b /gamemode/itemsystem/items/maul.lua | |
| parent | 52fb13ef163bcea7f1409e17fd62509703de9f69 (diff) | |
| download | wintersurvival2-0ceb38e8a1f26716fe4756c1cfbdbbedd1fae5f1.tar.gz wintersurvival2-0ceb38e8a1f26716fe4756c1cfbdbbedd1fae5f1.tar.bz2 wintersurvival2-0ceb38e8a1f26716fe4756c1cfbdbbedd1fae5f1.zip | |
Fixed some stuff
Diffstat (limited to 'gamemode/itemsystem/items/maul.lua')
| -rw-r--r-- | gamemode/itemsystem/items/maul.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gamemode/itemsystem/items/maul.lua b/gamemode/itemsystem/items/maul.lua index 2189eef..2c2e6fe 100644 --- a/gamemode/itemsystem/items/maul.lua +++ b/gamemode/itemsystem/items/maul.lua @@ -1,3 +1,4 @@ +local ITEM = {} ITEM.Name = [[Maul]] ITEM.Desc = [[The ultimate nutcracker!]] ITEM.Model = [[models/props_debris/wood_board02a.mdl]] @@ -35,15 +36,15 @@ ITEM.CD = 1 function ITEM:OnPrimary(pl,tr) if (CLIENT) then return end - + if (tr.Hit) then if (IsValid(tr.Entity)) then local ent = tr.Entity local class = ent:GetClass() - + if (class == "player" or class:find("npc_") or class == "ws_pigeon" or class == "ws_prop") then ent:TakeDamage(self.Damage,pl) - + if (class == "ws_prop") then pl:EmitSound(Sound("physics/wood/wood_plank_impact_hard"..math.random(1,3)..".wav"),100,math.random(90,110)) else pl:EmitSound(Sound("physics/flesh/flesh_impact_hard"..math.random(1,6)..".wav"),100,math.random(90,110)) end else @@ -55,4 +56,5 @@ function ITEM:OnPrimary(pl,tr) else pl:EmitSound(Sound("weapons/iceaxe/iceaxe_swing1.wav"),100,math.random(50,60)) end -end
\ No newline at end of file +end +RegisterItem(ITEM) |
