[TF2] How to block Cheat Commands
Hi,
I have a plugin which requires the sv_cheats cvar to be 1 to work properly. I am wondering if anyone knows how to block cheat commands such as noclip, god, buddha, etc. I have tried the same methods as the Cheat Control plugin uses, but unfortunately this doesn't block said cheat commands. Thanks! Steveh |
Re: [TF2] How to block Cheat Commands
I'm not completely positive, but you should be able to hook each command with RegConsoleCmd then put return Plugin_Handled; inside of it.
However, are you sure that you need to have sv_cheats enabled for your plugin? I know that you can adjust cheat values without actually turning cheats on. I would look into option two because otherwise you would have a lot of commands to hook. |
Re: [TF2] How to block Cheat Commands
Hi,
I have tried the first method, that didn't work unfortunately. The reason the server needs cheats on is because in TF2, the change in host_timescale doesn't take effect on clients. Otherwise, if cheats are off and the host_timescale is changed on the server, the value is replicated to the clients, but doesn't work the same as if cheats were on. Steveh |
Re: [TF2] How to block Cheat Commands
Quote:
What exactly are you trying to get out of host_timescale? If you're trying to change client speed Code:
SetEntDataFloat(client,FindSendPropInfo("CTFPlayer", "m_flMaxspeed"), newSpeed); Hopefully this helps; I would answer your question directly but I don't know how you would go about blocking the command : 3 Post thought: You could loop through the commands looking for FCVAR_CHEATS with "GetCommandFlags". However, after a little research, I found... Quote:
|
Re: [TF2] How to block Cheat Commands
This might possibly work, but I don't know.
PHP Code:
|
Re: [TF2] How to block Cheat Commands
Hi,
I'm going to give changing the Player's speed a try, and the SetFakeClientConVar a try aswell. I'll reply back soon with the results ^^ |
Re: [TF2] How to block Cheat Commands
Hi,
I tried the SetFakeClientConVar, but that is only for Fake Clients (Bots). I will give changing the player speed a go. I also found Tickrate_Enabler Server Plugin, that changes the Tickrate of the server, and I thought maybe I would be able to change the host_timescale from there? I'm not sure, but I'll post my findings here. Cheers |
Re: [TF2] How to block Cheat Commands
Quote:
It sends a value to the specific client, making the client think said convar is the specific value; when it's not really. |
Re: [TF2] How to block Cheat Commands
Quote:
|
All times are GMT -4. The time now is 17:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.