--[[ An example item ]] do return end local item = {} --Required, a name, all item names must be unique item.Name = "Scrap gun" --Optional, a tooltip to display item.Tooltip = "A gun made from bits of scrap" --Required Returns the data needed to rebuild this item, should only contain the minimum data nessessary since this gets sent over the network item.Serialize = function(self) print("Trying to serailize!") return "" end --Required, Rebuilds the item from data created in Serialize, if the item is different from the "main" copy of the item, it should retun a tabl.Copy(self), with the appropriate fields set. item.DeSerialize = function(self,string) print("Trying to deserialize!") return self end --Optional, when the player clicks this item, a menu will show up, if the menu item is clicked, the function is ran. This is all run client side, so if you want it to do something, you'll need to use the net library. function item.GetOptions(self) local options = {} options["test"] = function() print("You pressed test!") end options["toste"] = function() print("You pressed toste!") end return options end --Required, the shape of this item. item.Shape = { {true,true}, {true}, } --Optional, If this item can be equiped in any player slots, put them here. item.Equipable = "Left" --Optional, what to do when the player clicks, and this item is in the slot in inventory item.onClick = function(self,owner) print("pew pew!") end --Optional, if we should do something special on equip(like draw the PAC for this weapon) item.onEquip = function(self,who) print("onEquip",who) if CLIENT then print("onEquip client!") end if SERVER then PrintTable(pac) --local outfit = pac.luadata.ReadFile("pac3/mech.txt") --who:AttachPACPart(outfit) --print("onEquip server!") end end print("Hello from scrapgun.lua") --Don't forget to register the item! nrequire("item.lua").RegisterItem(item)