aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/exampleitem.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/exampleitem.lua')
-rw-r--r--gamemode/itemsystem/exampleitem.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/gamemode/itemsystem/exampleitem.lua b/gamemode/itemsystem/exampleitem.lua
index 3c76971..82483e6 100644
--- a/gamemode/itemsystem/exampleitem.lua
+++ b/gamemode/itemsystem/exampleitem.lua
@@ -41,16 +41,16 @@ if CLIENT then
end
--Optional. Something run once when this item is drawn in a backpack
-function item.DoOnPanel(dimagebutton)
- dimagebutton:SetImage( "weapons/rustyaxe/rustyaxe.png")
+function item.DoOnPanel(self,dmodelpanel)
+ dmodelpanel:SetModel( "models/player/alyx.mdl" ) -- you can only change colors on playermodels
end
--Optional. Something run once when this item is drawn in an equiped slot
-function item.DoOnEquipPanel(dimagebutton)
+function item.DoOnEquipPanel(self,dmodelpanel)
print("called with panel:",panel)
- dimagebutton:SetImage( "weapons/rustyaxe/rustyaxe_eq.png")
+ dmodelpanel:SetModel( "models/player/alyx.mdl" ) -- you can only change colors on playermodels
end
-
+--[[
--Optional. Called continuously, use if you need the item to display different stuff at different tiems in the backpack.
function item.Paint(self,width,height)
draw.RoundedBox(4, 0,0,width,height,Color(0,100,0))
@@ -60,7 +60,7 @@ end
function item.PaintEquiped(self,width,height)
draw.RoundedBox(4, 0,0,width,height,Color(0,100,0))
end
-
+]]
--Required, the shape of this item in a backpack.
item.Shape = {
{true},