I have a GUI and I thought I had setup the net message correctly so that the chat command would open it, but apparently I was wrong. Here’s the code:
functionsTable["menu"] = function( ply, args ) if plyHasPerms( ply ) then net.Start( "RASOpenConfigEditor" ) net.WriteTable( RAS.Config ) net.Send( ply ) else RAS.ChatPrint( "You do not have permission to do this!", ply ) end end
net.Receive("RASOpenConfigEditor", function() tbl = net.ReadTable() tfpick1 = tobool(tbl[RAS.Config.AntiSpamming]) tfpick2 = tobool(tbl[RAS.Config.Chat.Enabled]) tfpick3 = tobool(tbl[RAS.Config.Prop.Enabled]) tfpick4 = tobool(tbl[RAS.Config.Sent.Enabled]) tfpick5 = tobool(tbl[RAS.Config.Effect.Enabled]) tfpick6 = tobool(tbl[RAS.Config.Ragdoll.Enabled]) tfpick7 = tobool(tbl[RAS.Config.Vehicle.Enabled]) tfpick8 = tobool(tbl[RAS.Config.Npc.Enabled]) -- GUI code from here down(didn't want the thread to be super long)
I also have util.AddNetworkString( “RASOpenConfigEditor” ) in the main addon lua file.