Stupid Question

I have a lua file and its set to run a .cfg file except most of the command you have to have sv_cheats on. I was wondering what I would add to the lua file to make it turn sv cheats on? Also how would I go about blocking commands that could mess with the server since sv_cheats will be on?

open your autoexec.cfg
and put “sv_cheats 1” in it
I think…

its already in the config im trying to do it on my public server. It needs to be through lua because id have to make every1 who used it log into rcon through the autoexe.cfg and I don’t want that :stuck_out_tongue:

RunConsoleCommand(“sv_cheats”, “1”)

Stick it somewhere in your Lua file.

That will run it server side and not client?

You can’t activate it client side… (Without forcing it)

It is a shared function, if you run it on a serverside script it will run on the server, if you run it on a cleintside script it will run on the client.

[editline]23rd October 2010[/editline]

fuckin’ ninja’d :ninja:


Fyi, sv_cheats is blocked in RunConsoleCommand so that wouldn’t work.

Just hinting…


I just didn’t check if it was blocked or not. thanks for the information though :slight_smile:

If its blocked how do I run it?

You don’t.

[editline]24th October 2010[/editline]

FYI “exec” is blocked too.

really there is no way to unblock these?

You shouldn’t need to.

But I do need to =p setting it up so my TTT server has Bullet Time

Then you’re probably best of using purely concommands.
(You can use lua to force of noclip,godmode etc while cheats are on)