diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-19 13:46:06 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-19 13:46:06 -0400 |
| commit | 0b1d97a5ae72fabc611adb922a247f43b514815e (patch) | |
| tree | 057e8b885daf4ec8c6e272d064b8d40c3b5c77ae | |
| parent | 95a01138ddd5e602abc9d30877f1294cbdd04119 (diff) | |
| download | artery_editor-0b1d97a5ae72fabc611adb922a247f43b514815e.tar.gz artery_editor-0b1d97a5ae72fabc611adb922a247f43b514815e.tar.bz2 artery_editor-0b1d97a5ae72fabc611adb922a247f43b514815e.zip | |
fixed a bug with serverchanger zones
| -rw-r--r-- | lua/autorun/sv_npc.lua | 3 | ||||
| -rw-r--r-- | lua/autorun/town.lua | 5 | ||||
| -rw-r--r-- | lua/autorun/zone_serverchanger.lua | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/lua/autorun/sv_npc.lua b/lua/autorun/sv_npc.lua index a622d7b..8f346bb 100644 --- a/lua/autorun/sv_npc.lua +++ b/lua/autorun/sv_npc.lua @@ -99,7 +99,8 @@ hook.Add("InitPostEntity", "artery_spawnmapnpcs", function() loadMap() end) -concommand.Add("artery_reloadmap", function() +concommand.Add("artery_reloadmap", function(ply,cmd,args) + if not ply:IsAdmin() then return end for k, v in pairs(removeents) do local eot = ents.FindByClass(v) diff --git a/lua/autorun/town.lua b/lua/autorun/town.lua index 2805f7c..40131df 100644 --- a/lua/autorun/town.lua +++ b/lua/autorun/town.lua @@ -137,5 +137,8 @@ function loadtownies() end) end -concommand.Add("artery_loadtownies",loadtownies) +concommand.Add("artery_loadtownies",function(ply,cmd,args) + if not ply:IsAdmin() then return end + loadtownies() +end) hook.Add("InitPostEntity","load_lua",loadtownies) diff --git a/lua/autorun/zone_serverchanger.lua b/lua/autorun/zone_serverchanger.lua index afb92a6..9599479 100644 --- a/lua/autorun/zone_serverchanger.lua +++ b/lua/autorun/zone_serverchanger.lua @@ -33,7 +33,7 @@ hook.Add("ShowZoneOptions","artery_serverchange",function(zone,class,DPanel,zone print("server's onvaluechanged has been called") net.Start("artery_serverchange") net.WriteFloat(zoneID) - net.WriteString(new) + net.WriteString(to:GetValue()) net.SendToServer() end |
