#How to enable cheats?

1 messages · Page 1 of 1 (latest)

silver cradle
#

I have cheats enabled like so

function barebones:InitGameMode()
  GameRules:IsCheatMode()
end

they work if i start my game through the VConsole and workshop
but after I uploaded my game to workshop and play test it in the Dota2 Client cheats don't work.

Why?

earnest coral
#

that function does not enable cheats

civic shadowBOT
earnest coral
#

cheats work in tools mode because you are the server host

#

to enable cheats you need to use the console command sv_cheats 1 on the server

#

or, when making the lobby you can tick the checkbox that enables cheats

vital maple
#

lobby needs a password if you want to enable cheats

pulsar granite
#

Eh somehow, when i choose local host server, and cheat enabled with password. When i type svcheat in console the output like "cant change server convar bla bla.."

earnest coral
#

when you use local host in the normal dota client your pc is both the server and client, but the ingame console you use is for the client only

cinder nebula
#

also, the prefix sv_ denotes a server command

pulsar granite
#

Ah i see, ty for that info

silver cradle
#

I wonder if SendToServerConsole('sv_cheats 1') then, I'll try.

obsidian crane
#

Try use SetConvar instead, like Convar:SetInt( "sv_cheats", 1 ).
This works when altering such values: