Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Dude27th

Changing sv_cheats from the menu

Question

Is it possible ? And how can it be done ?

I'm working on a mod which where you shouldn't use cheats , but removing them entirely would be unfair for those people who want to just play with the weaponry. sv_cheats is deactivated in mapinfo and I know you can change that from the console , but coud I have an option from the menu to be less annoying to access ?

Share this post


Link to post

10 answers to this question

Recommended Posts

  • 0

You can absolutely do this. You could add this to the options menu using MENUDEF. It should work with this:

OptionValue "CheatsEnabled"
{
 0, "Disabled"
 1, "Enabled"
}

OptionMenu "CheatOption"
{
 Title "Cheats"
 Option "Cheats", "sv_cheats", "CheatsEnabled"
}

AddOptionMenu "OptionsMenu"
{
 StaticText ""
 Submenu "Cheat Option", "CheatOption"
}

Unfortunately, it doesn't work for me when I test it. The option appears at the bottom of the options menu as expected, but there is no way to change the value when clicking/hitting enter.

If you can solve this problem, more power to you. Maybe someone like @Gez can help you figure it out.

Share this post


Link to post
  • 0

sv_cheats is a latched variable, it will not change until you start a new game.

Share this post


Link to post
  • 0

So I have this

 

OptionValue EnableCheats
{
    0.0, " NO "
    1.0, " YES"
}

 

OptionMenu "zamnoptions"
{
title "Zombies Ate My Neighbors Options"

StaticText " "

  .

  .

  .

StaticText " "
option "Enable Cheats","sv_cheats","EnableCheats"
}

But it does nothing it seems and I can't change between option 0 or 1 , it is stuck in default :/

 

Share this post


Link to post
  • 0

Change the option (even if doesn't seem to change), start a new game, and look again in the menu to see if the change took effect or not.

Share this post


Link to post
  • 0

No , tried it but it doesn't change in the menu and there seems that it doesn't change after restarting also :/

 

Share this post


Link to post
  • 0

Restarting? I don't mean quitting the game and relaunching it. I mean menu->new game, without quitting.

Share this post


Link to post
  • 0

Restarting a new game

 

P.S: In case I was not clear enough by restarting I mean starting a new game again , not quitting the game

Share this post


Link to post
  • 0

Any idea @Gez ? :/


(Maybe it's the fact that the "sv_cheats" is a boolean , and the options that I am using are integers?)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×