I want to have a cvar that determines whether or not to use my script.
I've tried:
[lua]
CreateConVar( "sv_mycommand", "1", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
if sv_ragfall:GetBool() then
--run my script
end
[/lua]
But that didn't work. :(
It also says in console:
[code]
autorun/server/myscript.lua:3: attempt to index global 'sv_mycommand' (a nil value)
[/code]
Sorry, you need to Log In to post a reply to this thread.