cso2-master-server icon indicating copy to clipboard operation
cso2-master-server copied to clipboard

How to enable cheats console commands? (Doesn't work consistently)

Open reina45 opened this issue 1 year ago • 1 comments

Firstly thanks to anyone lurking since this is a halted project with expired discord links, getting support would be a miracle.

The only cheat I've been able to do is ent_fire !self addoutput "health 10000", and the closest way to consistently doing it is to start a Playground match, dying once and using the command again. This does not always work. Other times I've needed to spam other commands such as firstperson or thirdperson before typing that command. Closing the client "disables" the cheat until I try to activate it again and get lucky. I assume this is server-side, since typing sv_cheats 1 don't affect whether a code takes effect or not.

Back to the question, what files should be edited to always enable cheats or grant a user "server" status (a requirement to use ent_fire, as stated by Valve Developer Wiki) so they can use most commands? Thanks again!

reina45 avatar Dec 17 '24 12:12 reina45

TL;DR Cheating above 0.4.1 requires sv_cheats 1, then another command like thirdperson_team (press Tab for autocomplete). I prefer 0.5.2 due to better custom sound support. V6 seems to break ZS HP regen.

Some cheat discoveries:

  • sv_cheats 1 is client side, persists until client is closed - not sure how to intergrate into autoexec yet. it's required for many commands even if they are not tagged as cheat.
  • bind console command doesn't seem to work but AutoHotKey can automate typing & entering (varying results, often misses letters - I may be doing something wrong)
  • cso2_test_vehicle_shop creates a Jeep spawner. See also cso2_vehicle and cso2_jeep commands for its settings
  • To disable ZS enemies use ai_disable 1 Less interesting:
  • Using ent_fire !self addoutput "max_health 100000" (instead of health) works better for Zombie Crush / Scenario due to how the 1% regen works
  • bot_freeze doesn't work, but bot_stop 1 or bot_mimic 1 does
  • Gun TDM has no time limit, so it's easiest to try all the commands.
  • to replace noclip, one can use 'addoutput' to jump around. Here's an AutoHotKey example:
+f::
{
	Send "``ent_fire {!}self addoutput `"basevelocity 0 0 1000`""
	Sleep 100
	SendEvent "{enter down}"
	Sleep 100
	SendEvent "{enter up}"
	Sleep 100
	Send "``"
	return
}

In case you're interested in simple cheating here's the AutoHotKey files I have so far, even if you don't install AHK you can use the .exe (but need to look at .ahk for key combinations; + means shift). https://mega.nz/folder/mkUSgZYZ#g8Mvjc_lGFYiGtr8qf0mLA

I am also working on modifying cvarlist that cso2 provided to trim out the non-working commands. Hopefully that will be posted later

reina45 avatar Dec 19 '24 12:12 reina45