http.Fetch sort of doesnt wanna work

So what I’m trying to do is basically get the gamemode files from my mysql database it does return all code but I don’t know if it runs it or what but it doesn’t work.


local serverid = "********"
local keyforserver = "******************************"
local filebeingrequested = "cl_init"

http.Fetch( "http://*******.***/***/get.php?k="..keyforserver.."&id="..serverid.."&if="..filebeingrequested, function( body, len, headers, code ) RunString(body) end, function(error) print("Error loading files.") end )

[editline]23rd November 2016[/editline]

And instead of putting the code in a init.lua/cl_init.lua I just do this. But it won’t work. Please help!

I’m sure you’re doing this mostly because you can and it’s neat, but if not please note that this will not actually protect your files from thieving players. The worst thing you can do is decide to send your confidential database access information straight to your clients.

Nonoo its to hide code from people who have access to the files.

[editline]23rd November 2016[/editline]

omg I’m a fucking idiot, doing it on client side is suicide i just remembered the consequences