Pivity

Setting sbox_noclip to 0

Last read Never
#1

I have in server.cfg and autoexec.cfg sbox_noclip set to 0 but on server sbox_noclip is still 1, so i tried making lua script that set it to 0 with runconsolecommand but it dont change. How i can set convar in gmodlua?

Code

function chksbox()

if (GetConVar("sbox_noclip") == 1) then

RunConsoleCommand("sbox_noclip", 0)

end

end

timer.Simple(15, chksbox)

#2

Doesnt the 0 also have to be a string, probably best if you check gmod wiki

Agree x 1
#3

Can't you add +sbox_noclip 0 to your start parameters of your server? (You probably have a start.sh or something where you can put it in)

#4

Not sure if you have FAdmin on your server but I had an issue where it had saved my sbox_noclip value as 1. You can use a db browser and look through your server sv.db to see what it's set to.

#5

Also i4 would be GetConVar():GetInt() I think

Users viewing this thread
Nobody