aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-05-20 13:15:45 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-05-20 13:15:45 -0400
commit0ae33ad32868af226fba6d887320aa87aa19d3a4 (patch)
treef2cdbfeb5ba5fa8364126a4753cba3b2b6d06a8f /gamemode/itemsystem
parentc6698dad925e75ffd2ca2f2e30a595d4ce48d240 (diff)
downloadartery-0ae33ad32868af226fba6d887320aa87aa19d3a4.tar.gz
artery-0ae33ad32868af226fba6d887320aa87aa19d3a4.tar.bz2
artery-0ae33ad32868af226fba6d887320aa87aa19d3a4.zip
Fixed models drawing in inventory
Diffstat (limited to 'gamemode/itemsystem')
-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},