mirror of
https://codeberg.org/spire/nocheats.git
synced 2026-06-03 18:24:11 +02:00
initial version
This commit is contained in:
commit
11aa9d1247
3 changed files with 37 additions and 0 deletions
11
README.md
Normal file
11
README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# NoCheats
|
||||||
|
|
||||||
|
Stop people from enabling sv_cheats
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
[Download Plugin](https://github.com/spiretf/nocheats/raw/master/plugin/nocheats.smx)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Just enable the plugin
|
||||||
BIN
plugin/nocheats.smx
Normal file
BIN
plugin/nocheats.smx
Normal file
Binary file not shown.
26
plugin/nocheats.sp
Normal file
26
plugin/nocheats.sp
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue