diff options
Diffstat (limited to 'gamemode/itemsystem/items/recipe_crystalhammer.lua')
| -rw-r--r-- | gamemode/itemsystem/items/recipe_crystalhammer.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gamemode/itemsystem/items/recipe_crystalhammer.lua b/gamemode/itemsystem/items/recipe_crystalhammer.lua new file mode 100644 index 0000000..097aa1a --- /dev/null +++ b/gamemode/itemsystem/items/recipe_crystalhammer.lua @@ -0,0 +1,27 @@ +
+ITEM.Name = "Recipe: Crystal Hammer"
+ITEM.Class = "account"
+ITEM.Desc = "A recipe. Use it to print it on chat!"
+ITEM.Model = "models/Weapons/w_bugbait.mdl"
+ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png")
+
+function ITEM:OnUse(user)
+ if (CLIENT) then return end
+
+ local rec,item = GetRecipeForItem("Crystal Hammer")
+ local txt = "Recipe: "
+
+ txt = txt.." RESOURCES("
+ for a,b in pairs(rec.Resources) do
+ txt=txt..b.." x "..a..", "
+ end
+ txt = txt..")"
+
+ txt = txt.." TOOLS("
+ for a,b in pairs(rec.Tools) do
+ txt=txt..b.." x "..a..", "
+ end
+ txt = txt..")"
+
+ user:ChatPrint(txt)
+end
\ No newline at end of file |
