AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Cheat commands that require sv_cheats 1 (https://forums.alliedmods.net/showthread.php?t=105027)

EHG 09-30-2009 11:02

Cheat commands that require sv_cheats 1
 
1 Attachment(s)
Description
This plugin will allow admins with root access (feel free to edit the admin flag required) to use any command that requires sv_cheats including those commands that still don't work after removing their cheat flag.
What this plugin does is quietly setting sv_cheats to 1, running the command, and then setting it back to 0 without ever sending sv_cheat activity to the client.
However if a cheat command works by removing its cheat flag then that it is recommended to do so instead of using this.

A nice plugin that removes the cheat flag for admins: http://forums.alliedmods.net/showthread.php?t=81101

Certain commands like thirdperson will still not work using this method because they don't require server side cheats but instead require client side sv_cheats.
For commands like thirdperson you can use the following plugin to send sv_cheats 1 to a client without altering server side sv_cheats:
http://forums.alliedmods.net/showthread.php?t=92289


Make a file called sm_cheat_cvars.cfg in your server's cfg folder. In L4D2 whenever sv_cheats is modified all cvars are reset. So if you have any custom values that you don't want to be reset after using this command then list them in that file. It is executed after running the command.
note: you may have to use sm_cvar <cvar> for certain cvars, just like you would in server.cfg

Something to keep in mind
Changing the sv_cheats cvar resets cvars like sb_stop and sb_all_bot_team. Just something to keep in mind, it can mess with scripts that rely on certain cvars not being reset.
A good example is the L4D2 Score/Team manager that relies on sb_all_bot_team being set to 1. Or my Round Start Bot Stop script relies on sb_stop being changed at certain times.
Keep in mind that using this may have unwanted effects on scripts like that.

Commands
sm_cheat <command>

Example
sm_cheat ent_setname !picker sentry1


Change log
1.2
Added a config to be executed after each usage of the command
1.1 Altered code to allow usage for any command requiring sv_cheats
1.0 First release

Maxis010 09-30-2009 11:10

Re: ent_fire command without sv_cheats 1
 
Quote:

Originally Posted by EHG (Post 948015)
Description
Allows admins with root access to use the ent_fire command without sv_cheats set to 1.

Commands
sm_ent_fire <command>


Sourcemod moderators: Can you correct that Plugin Game: Counter-Strike: source to say Any

Not knocking your work but this is already part of FuncommandsX

P.S Edit your post, then click Go Advanced and you can change your plugin details including the Plugin Game

EHG 09-30-2009 14:32

Re: ent_fire command without sv_cheats 1
 
FuncommandsX does not include usage of ent_fire without sv_cheats 1.
Maybe you are thinking of an explode command or actual fire?
ent_fire is a developer tool to set information on a specific entity ingame.

Maxis010 09-30-2009 14:51

Re: ent_fire command without sv_cheats 1
 
Quote:

Originally Posted by EHG (Post 948251)
FuncommandsX does not include usage of ent_fire without sv_cheats 1.
Maybe you are thinking of an explode command or actual fire?
ent_fire is a developer tool to set information on a specific entity ingame.

Your right, ignore me, went back and checked my scripting folder, found what I was thinking of and compared that code to your's

olj 10-03-2009 04:59

Re: ent commands without sv_cheats 1
 
Can we use this for any commands? Like "boom" command for l4d? Stripping of cheats flag doesnt work there.

noodleboy347 10-03-2009 15:15

Re: ent commands without sv_cheats 1
 
Can you do ent_remove that doesn't crash the server when a player is deleted?

EHG 10-05-2009 01:39

Re: Cheat commands without sv_cheats 1
 
I have updated the plugin to allow usage with any command.

noodleboy347:
search around for something called l4d build enabler, if I remember correctly it includes code that blocks the ent_remove command from being used on important objects like players and saferoom doors..etc

Frus 10-05-2009 02:21

Re: Cheat commands without sv_cheats 1
 
Could you add a feature to allow you to specify which client executes the command? So an admin could force any client to execute a cheat command.

Dragonshadow 10-05-2009 12:32

Re: Cheat commands without sv_cheats 1
 
since it silently sets it to 1 you can't use this with KAC can you?

EHG 10-05-2009 23:39

Re: Cheat commands without sv_cheats 1
 
This plugin sets sv_cheats 1 server side.
sv_cheats 1 is never sent to the client.
Unless I am mistaken KAC only checks clients that modify their sv_cheats client side.


All times are GMT -4. The time now is 18:55.

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