Raised This Month: $32 Target: $400
 8% 

sv_cheats ONLY FOR HOST / ADMIN


Post New Thread Reply   
 
Thread Tools Display Modes
Sreaper
髪を用心
Join Date: Nov 2009
Old 06-23-2022 , 17:54   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #11

Quote:
Originally Posted by hellnecrotom View Post
Hey there, thanks, I actually managed to compile it.

Sorry to miss the obvious, but how would I use this?

Does this turn on sv_cheats only for me?

Thanks for the help
It won't do what you want. What his does is send sv_cheats 1 to root admins everytime they spawn in-game for any reason. Where as mine just sends it one time, once a client has been authorized after joining the server assuming steam isn't down. Both plugins are only designed for clientside cheats, not server side ones like 'noclip' 'respawn'.

You would need a separate plugin for that and unfortunately I haven't attempted to make something like that before else I would share it with you.

Last edited by Sreaper; 06-23-2022 at 17:58.
Sreaper is offline
AuricYoutube
Senior Member
Join Date: Aug 2016
Location: Here
Old 06-23-2022 , 17:55   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #12

Quote:
Originally Posted by hellnecrotom View Post
Hey there, thanks, I actually managed to compile it.

Sorry to miss the obvious, but how would I use this?

Does this turn on sv_cheats only for me?

Thanks for the help
It should automatically turn on sv_cheats for anyone with the root (z) flag, again untested
AuricYoutube is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-23-2022 , 17:59   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #13

I use Admin Cheats
__________________
Silvers is offline
hellnecrotom
Junior Member
Join Date: Feb 2021
Old 06-23-2022 , 19:30   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #14

Thanks, everyone, for the explanation.

I actually did end up using Admin Cheats (reached the same conclusion as Silvers above me), as I found no better solution. As for respawn, I even made a separate thread regarding it. I found that sv_cheats 0 only resets the cvars that have a cheat flag (the only explanation I can posit after seeing that not all are reset). Thus, after going one by one and testing which ones reset, I simply created a CFG that I attached after the sv_cheats 0 command.

So, I created the string of commands as follows to be able to respawn (fairly standard, but finnicky when considering resetting cvars):

sm_cvar sv_cheats 1;
respawn_all;
sm_cvar sv_cheats 0;
exec SvCheats0.cfg (I put basic server cvar values here so that they are maintained after they reset due to sv_cheats 0)

I bound all that to a key and that's that. Adding Admin Cheats on top of that allows me to cheat as an admin. Whenever a cheat that does not work with Admin Cheats needs to be used, I use the above formula to instantly turn off cheats again.

This is the best solution I could find after scouring all the internet - not only Alliedmodders.

Hope it helps others.

Cheers, everyone!

Last edited by hellnecrotom; 06-23-2022 at 19:32.
hellnecrotom is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-23-2022 , 22:35   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #15

Doing that will likely break achievements once sv_cheats has been turned on. Could look at Dev Cmds plugin for the cheat command it provides.
__________________
Silvers is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 06-24-2022 , 23:49   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #16

Quote:
Originally Posted by hellnecrotom View Post
Thanks, everyone, for the explanation.

I actually did end up using Admin Cheats (reached the same conclusion as Silvers above me), as I found no better solution. As for respawn, I even made a separate thread regarding it. I found that sv_cheats 0 only resets the cvars that have a cheat flag (the only explanation I can posit after seeing that not all are reset). Thus, after going one by one and testing which ones reset, I simply created a CFG that I attached after the sv_cheats 0 command.

So, I created the string of commands as follows to be able to respawn (fairly standard, but finnicky when considering resetting cvars):

sm_cvar sv_cheats 1;
respawn_all;
sm_cvar sv_cheats 0;
exec SvCheats0.cfg (I put basic server cvar values here so that they are maintained after they reset due to sv_cheats 0)

I bound all that to a key and that's that. Adding Admin Cheats on top of that allows me to cheat as an admin. Whenever a cheat that does not work with Admin Cheats needs to be used, I use the above formula to instantly turn off cheats again.

This is the best solution I could find after scouring all the internet - not only Alliedmodders.

Hope it helps others.

Cheers, everyone!
Have you tried this plugin? https://forums.alliedmods.net/showthread.php?p=600521
On a side note, I wasn't able to find the respawn_all command you mentioned for L4D2. https://developer.valvesoftware.com/..._of_L4D2_Cvars

Last edited by Sreaper; 06-24-2022 at 23:50.
Sreaper is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-25-2022 , 00:38   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #17

Quote:
Originally Posted by Sreaper View Post
Have you tried this plugin? https://forums.alliedmods.net/showthread.php?p=600521
On a side note, I wasn't able to find the respawn_all command you mentioned for L4D2. https://developer.valvesoftware.com/..._of_L4D2_Cvars
For whatever reason "respawn_all" doesn't show up as a client or server cvar (when doing "help respawn_all"), it's not found when finding the convar on server, but it does work when sv_cheats is set to 1. Better to use a respawn plugin though.

Turning on sv_cheats even for only 1 client will most likely prevent achievements/stats logging for that session, you would see the spam in console when killing common infected saying it's prevented logging stats due to cheats being used. This is why I suggest against ever enabling sv_cheats and instead finding alternatives, there are plenty of plugins.

Is this command one of those "hidden" cvars/commands?

hellnecrotom, you only mentioned "respawn_all", what are the other 50 that you can't do without sv_cheats?
__________________
Silvers is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 06-25-2022 , 07:20   Re: sv_cheats ONLY FOR HOST / ADMIN
Reply With Quote #18

I believe some commands are listed in that small list here:

Talk:List of L4D2 Cvars
__________________

Last edited by Marttt; 06-25-2022 at 07:21.
Marttt is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:56.


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