aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2018-11-02 16:11:45 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2018-11-02 16:11:45 -0400
commitc639e7c7c6ab1595fdce39f56312e3d6a886bbe8 (patch)
tree52f57ef8ca87ff93935d694b34a8f61d4441d4c0 /gamemode/core
parent9408c8cc53b99585b1cfb3c4fbf0a1f4df438bd6 (diff)
downloadartery-c639e7c7c6ab1595fdce39f56312e3d6a886bbe8.tar.gz
artery-c639e7c7c6ab1595fdce39f56312e3d6a886bbe8.tar.bz2
artery-c639e7c7c6ab1595fdce39f56312e3d6a886bbe8.zip
Started work on editor
Diffstat (limited to 'gamemode/core')
-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