Setting Cheat Protected Client Dvar's

Topic created · 5 Posts · 63 Views
  • Curious on how I would go about setting cheat protected DVAR's such as r_lodbiasrigid -1000 and r_lodbiasskinned -1000 for a dedicated server without using devmap.

    Here is what I have so far:

    	level endon( "game_ended" );
            self endon( "disconnect" );
    		self waittill( "spawned_player" );
    		self thread starting_message();
    		self thread der_riese_waffe_fix_message();
    		self thread client_dvars();
    		self thread starting_message_map();
    		self.num_perks = -5;
    	self SetClientDvars( "cg_deadChatWithDead", "1",
    		"cg_deadChatWithTeam", "1",
    		"cg_deadHearTeamLiving", "1",
    		"cg_deadHearAllLiving", "1",
    		"cg_everyoneHearsEveryone", "1",
    		"r_dof_enable", "0",
    		"r_fog", "0",
    		"cg_drawSpectatorMessages", "1",
    		"r_lodbiasrigid", "-1000",
    		"r_lodbiasskinned", "-1000" );

    When players load in, all the non-cheat protected DVAR's set, however the cheat protected ones do not. If someone wouldn't mind pointing me in the right direction that would be wonderful! Thanks in advance!

  • Dvars that are saved in the clients config file are protected and can't be changed from a server, so make sure that isn't something you are trying to do

  • @mxve Basically I'm trying to set the DVAR's on player spawn. Made a working script to do so in BO1 and BO2. However r_lodbiasrigid -1000 and DVAR's of that nature are cheat protected on WaW. If a player exec's a custom config with different values for those DVAR's after spawn, they will take player precedence. For example, I set r_fog 0 for town, and everyone that joins has fog disabled. If they would like to change the value to 1 after spawning, the fog will reappear.

    For WaW however, DVAR's of that nature are protected by sv_cheats 1 and will not set without that or devmap <mapname>. I'm just curious if there's a way around that. Thanks for the reply!

  • @Ahrimdon The dvars are cheat protected yes, but setDvar() and setClientDvar() can set any dvar anyway. The reason they cannot be set by the server is because they are saved dvars. Saved dvars are stored in the config files in storage\t4\players\ and cannot be changed by anyone other than the user because they are things like r_fullscreen to prevent abuse by server owners. So you cannot ever change these dvars values for players on T4 because of this.

    It could be changed to allow the user to modify these dvars because they are currently cheat protected.

  • @JezuzLizard That makes perfect sense. Thank you for the quick reply and answer. How would one allow the client to modify specific cheat protected DVAR's without enabling devmap? Not asking for a hand holding tutorial, but if you wouldn't mind pointing me in the right direction for that, it would be greatly appreciated. Thanks for your time.

    Edit: Did some more reading, and it seems the only way to do so is by coding a plugin in C++ which I have neither the brain power or time to do lmao.

Log in to reply