initial version

This commit is contained in:
Robin Appelman 2020-03-22 23:16:20 +01:00
commit 11aa9d1247
3 changed files with 37 additions and 0 deletions

BIN
plugin/nocheats.smx Normal file

Binary file not shown.

26
plugin/nocheats.sp Normal file
View file

@ -0,0 +1,26 @@
#pragma semicolon 1
#include <sourcemod>
#include <tf2>
public Plugin:myinfo = {
name = "nocheats",
author = "Icewind",
description = "Prevent settings sv_cheats 1",
version = "0.1",
url = "https://spire.tf"
};
ConVar sv_cheats;
public OnPluginStart() {
sv_cheats = FindConVar("sv_cheats");
if (sv_cheats != null) {
sv_cheats.AddChangeHook(OnSvCheats);
}
}
public void OnSvCheats(ConVar convar, char[] oldValue, char[] newValue){
if (StringToInt(newValue) != 0) {
convar.IntValue = 0;
}
}