From c639e7c7c6ab1595fdce39f56312e3d6a886bbe8 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Fri, 2 Nov 2018 16:11:45 -0400 Subject: Started work on editor --- gamemode/core/editor/editor.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gamemode/core') 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 -- cgit v1.2.3-70-g09d2