summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott <scotth0828@gmail.com>2016-05-21 18:36:26 -0400
committerScott <scotth0828@gmail.com>2016-05-21 18:36:26 -0400
commit18e985e9e989190e937db0418910841e00f1c274 (patch)
tree954fd36f413166c42eccc18a28024284cf3c7c76
parent38862d94897411ad1f56e9fa2fba1a4d703cd783 (diff)
downloadgmstranded-18e985e9e989190e937db0418910841e00f1c274.tar.gz
gmstranded-18e985e9e989190e937db0418910841e00f1c274.tar.bz2
gmstranded-18e985e9e989190e937db0418910841e00f1c274.zip
Fixed spawning in admin menu
-rw-r--r--gamemode/client/cl_inventory.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/gamemode/client/cl_inventory.lua b/gamemode/client/cl_inventory.lua
index ab02c48..d0388e7 100644
--- a/gamemode/client/cl_inventory.lua
+++ b/gamemode/client/cl_inventory.lua
@@ -922,11 +922,11 @@ PANEL.SpawningCmds = {
{ text = "Spawn food", cmd = "gms_admin_makefood" },
{ text = "Save all characters", cmd = "gms_admin_saveallcharacters" },
{ text = "Plant random plant", cmd = "gms_admin_makeplant" },
- { text = "Plant melons", cmd = "gms_admin_makeplant 1" },
- { text = "Plant banana tree", cmd = "gms_admin_makeplant 2" },
- { text = "Plant oranges", cmd = "gms_admin_makeplant 3" },
- { text = "Plant berry bush", cmd = "gms_admin_makeplant 4" },
- { text = "Plant grain", cmd = "gms_admin_makeplant 5" }
+ { text = "Plant melons", cmd = "gms_admin_makeplant", args = "1" },
+ { text = "Plant banana tree", cmd = "gms_admin_makeplant", args = "2" },
+ { text = "Plant oranges", cmd = "gms_admin_makeplant", args = "3" },
+ { text = "Plant berry bush", cmd = "gms_admin_makeplant", args = "4" },
+ { text = "Plant grain", cmd = "gms_admin_makeplant", args = "5" }
}
PANEL.Settings = {
@@ -942,6 +942,7 @@ PANEL.Settings = {
{ text = "Spawn zombies at night", elem = "DCheckBoxLabel", cmd = "gms_zombies" },
{ text = "Enable day/night cycle", elem = "DCheckBoxLabel", cmd = "gms_daynight" },
//{ text = "Costs scale", elem = "DNumSlider", decimals = 1, cmd = "gms_CostsScale", min = 1, max = 4 },
+ //{ text = "Costs scale", elem = "DNumSlider", decimals = 1, cmd = "gms_CostsScale", min = 1, max = 4 },
{ text = "Plant limit per player", elem = "DNumSlider", cmd = "gms_PlantLimit", min = 10, max = 35 },
{ text = "", elem = "DLabel" },
{ text = "Reproduce trees", elem = "DCheckBoxLabel", cmd = "gms_ReproduceTrees" },
@@ -1005,7 +1006,8 @@ function PANEL:Init()
local item = vgui.Create( "DButton" )
item:SetText( t.text )
item:SetTall( 26 )
- item:SetConsoleCommand( t.cmd )
+ print(t.args)
+ if (t.args != nil) then item:SetConsoleCommand( t.cmd, t.args ) else item:SetConsoleCommand( t.cmd ) end
self.Spawning:AddItem( item )
end