AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   [L4D2] sv_cheats 1/0 RESETS SERVER CVARS (https://forums.alliedmods.net/showthread.php?t=338263)

hellnecrotom 06-22-2022 09:04

[L4D2] sv_cheats 1/0 RESETS SERVER CVARS
 
Hey guys, I have an issue that I can't jump over in L4D2.

I am trying to prevent other people from using cheat commands aside from me.

I can achieve this by using a plugin called Admin Cheats. This largely solves my problem but there is a hiccup: the command "respawn" and "respawn_all" do not work with "sv_cheats 0" even with Admin Cheats on.

Thus, I instead wanted to enable cheats, use cheats, and then disable them instantly (example: sv_cheats 1;respawn_all;sv_cheats 0). This would work fine with a single exception: "sv_cheats 0" resets my server cvars.

Now I added a cfg to automatically load all default server cvars for me after setting sv_cheats to 0, but that would mean running around 50+ cvars every time I use a cheat, because then it would look something like this: sv_cheats 1;respawn_all;sv_cheats 0;exec DefaultCvars(.cfg).

Since I have cvars that I change based on the game we play, this would be EXTREMELY TEDIOUS to reapply after each cheat.

I looked for solutions to only enable sv_cheats to me (the host), but I could find nothing.

Can anyone help with this?

Does someone know how to achieve either of these:

1. Prevent the game from resetting server cvars after sv_cheats is restored to 0.
2. Enable sv_cheats ONLY FOR ME so that other players cannot abuse cheats.

Thanks in advance.

alasfourom 06-24-2022 15:46

Re: [L4D2] sv_cheats 1/0 RESETS SERVER CVARS
 
why don't you install some plugins, you have plenty of plugins that can do the job you want.

https://forums.alliedmods.net/showthread.php?p=2693455

if you want to make a server that can save the cvar settings, just create server.cfg file inside your \Left 4 Dead 2\left4dead2\cfg Folder

then just put the cvars you want make sure it starts with sm_cvar, for example sm_cvar sv_cheats 1

to make sv_cheats 1 only works for u, I dont think its possible without some plugins

HarryPotter 06-29-2022 14:24

Re: [L4D2] sv_cheats 1/0 RESETS SERVER CVARS
 
All4Dead2 Improved Version: Enables admins to have control over the AI Director and spawn all weapons, melee, items, special infected, and Uncommon Infected without using sv_cheats 1


All times are GMT -4. The time now is 19:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.