From 79c1c484eab6fbf36a69d155a324540887e38880 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 29 Oct 2016 17:51:13 -0400 Subject: Got shops working --- gamemode/client/cl_inventory.lua | 5 +++++ gamemode/client/cl_weaponswitch.lua | 4 ++++ gamemode/client/qpanels/inventory.lua | 5 ++++- 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'gamemode/client') diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua index b806846..a40a5f8 100644 --- a/gamemode/client/cl_inventory.lua +++ b/gamemode/client/cl_inventory.lua @@ -7,6 +7,11 @@ print("Hello from cl_inventory.lua") ART.PrayerEquiped = ART.PrayerEquiped or { false,false,false,false } +net.Receive("equiphelpprayer",function() + print("equiphelp received client side!") + ART.PrayerEquiped[4] = "Noob Help" +end) + local lastpanel = lastpanel or 1 diff --git a/gamemode/client/cl_weaponswitch.lua b/gamemode/client/cl_weaponswitch.lua index 5aaed87..f7edcfc 100644 --- a/gamemode/client/cl_weaponswitch.lua +++ b/gamemode/client/cl_weaponswitch.lua @@ -1,3 +1,7 @@ function GM:PlayerSwitchWeapon( ply, oldWeapon, newWeapon ) return false end + +hook.Add( "HUDShouldDraw", "HideWeaponSelHUD", function( name ) + if name == "CHudWeaponSelection" then return false end +end ) diff --git a/gamemode/client/qpanels/inventory.lua b/gamemode/client/qpanels/inventory.lua index 9fec1cc..b366c7a 100644 --- a/gamemode/client/qpanels/inventory.lua +++ b/gamemode/client/qpanels/inventory.lua @@ -82,7 +82,10 @@ local function DrawBackpackOnDPanel(dp, backpack, backpacknum, tent) if invfuncs.CanFitInBackpack(backpack,j,i,item) then local fromtbl = icon.invpos local wasequiped = icon.wasequiped - if wasequiped then + local ondropped = icon.ondropped + if ondropped then + ondropped(backpacknum,j,i,item) + elseif wasequiped then net.Start("unequipitem") net.WriteString(wasequiped) net.WriteUInt(backpacknum,16) -- cgit v1.2.3-70-g09d2