ITEM = {} ITEM.Name = "Medicine" ITEM.Description = "Heals you!" ITEM.Icon = "items/medicine.png" ITEM.UniqueData = false if(SERVER) then util.AddNetworkString( "gms_usemedicine" ) end local client_use = function() net.Start("gms_usemedicine") net.SendToServer() end local finisheduseing = function(player) player:DecResource( "Medicine", 1 ) player:SendMessage( "You're feeling a bit better now.", 3, Color( 10, 200, 10, 255 ) ) player:Heal( 10 ) end local use_medicine = function(ln, player) if ( player:GetResource( "Medicine" ) < 1 ) then player:SendMessage( "You need Medicine.", 3, Color( 200, 0, 0, 255 ) ) return end startProcessGeneric(player,"Patching yourself up",1.5,finisheduseing) end net.Receive( "gms_usemedicine", use_medicine) ITEM.Actions = {} genericMakeDroppable(ITEM) ITEM.Actions["Use"] = client_use GMS.RegisterResource(ITEM)