• Help needed on adding config to addon
    2 replies, posted
I am currently developing a addon for gmod and am wanting to add a config file to it. I made a file here ( garrysmod/addons/Raid/lua/srconfig.lua ) then on the server side script I added [CODE] AddCSLuaFile("srconfig.lua") [/CODE]. I tried to use a varible that is in that script but its not working. Please help. Here is my code. [CODE] AddCSLuaFile('cl_sraid.lua') AddCSLuaFile('srconfig.lua') hook.Add("PlayerSay", "getChat", function(ply, text, public) text = string.lower( text ) if text == StartCommand then print('Start') return "" end end) [/CODE]
You need to include the file as well, not just AddCSLuaFile it.
Oh yeah lol, Thanks, I havent coded in a little so I forgot all about include xD
Sorry, you need to Log In to post a reply to this thread.