diff options
Diffstat (limited to 'gamemode/itemsystem/items/spell_fireball.lua')
| -rw-r--r-- | gamemode/itemsystem/items/spell_fireball.lua | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gamemode/itemsystem/items/spell_fireball.lua b/gamemode/itemsystem/items/spell_fireball.lua index 14bca66..dc7d7e0 100644 --- a/gamemode/itemsystem/items/spell_fireball.lua +++ b/gamemode/itemsystem/items/spell_fireball.lua @@ -10,6 +10,15 @@ ITEM.HoldType = "magic" game.AddParticles("particles/particletest.pcf") PrecacheParticleSystem("firetest") +ITEM.Structure = { + { + Bone = "ValveBiped.Bip01_R_Hand", + Model = "models/props_junk/Rock001a.mdl", + Size = Vector(1,1,1), + Pos = Vector(0,0,0), + Ang = Angle(0,0,0), + }, +} ITEM.Recipe = { Resources = { @@ -21,6 +30,7 @@ ITEM.Recipe = { } ITEM.CD = 0.25 +ITEM.Range = 9999 --[[ The number of fireballs a player has is held in a global table where each entry is @@ -46,7 +56,7 @@ fireball["onhit"] = function (self,data,phys) end end - self:Remove() + self.Remove(self) end function ITEM:DoFireball(pl) @@ -100,6 +110,10 @@ end function ITEM:OnPrimary(pl,tr) if CLIENT then return end print("Attempting to cast...") - pl:Cast("Fireball",fireballfunc,self) + if NumFireballs[pl] == nil or NumFireballs[pl] < 3 then + pl:Cast("Fireball",fireballfunc,self) + else + pl:ChatPrint("You can't summon any more fireballs") + end end RegisterItem(ITEM) |
