aboutsummaryrefslogtreecommitdiff
path: root/gamemode
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode')
-rw-r--r--gamemode/core/editor/editor.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/gamemode/core/editor/editor.lua b/gamemode/core/editor/editor.lua
index 23c5991..5d815c4 100644
--- a/gamemode/core/editor/editor.lua
+++ b/gamemode/core/editor/editor.lua
@@ -1,3 +1,27 @@
--[[
Allow admins to develop the world in-game.
]]
+
+local e = {}
+
+if SERVER then
+ util.AddNetworkString("art_enable_editor")
+end
+
+--Enable editor mode
+e.Enabled = false
+
+if CLIENT then
+ net.Receive("art_enable_editor",function()
+ e.Enabled = true
+ end)
+end
+
+concommand.Add("artery_enable_editor",function(ply,cmd,args)
+ if not ply:IsAdmin() then return end
+ net.Start("art_enable_editor")
+ net.Broadcast()
+ e.Enabled = true
+end)
+
+return e