inital commit
This commit is contained in:
29
VMC.sp
Normal file
29
VMC.sp
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Plugin Template generated by Pawn Studio */
|
||||
|
||||
#include <sourcemod>
|
||||
|
||||
new Handle:hVisibleMaxPlayers;
|
||||
new g_visibleMaxPlayersVal = 24;
|
||||
|
||||
public Plugin:myinfo =
|
||||
{
|
||||
name = "VMPChecker",
|
||||
author = "Chefe",
|
||||
description = "Checks that visiblemaxplayers is set correctly",
|
||||
version = "1.0",
|
||||
url = "oktoberfest-servers.net"
|
||||
}
|
||||
|
||||
public OnPluginStart()
|
||||
{
|
||||
hVisibleMaxPlayers = FindConVar("sv_visiblemaxplayers");
|
||||
HookConVarChange(hVisibleMaxPlayers, OnVisibleChange);
|
||||
}
|
||||
|
||||
public OnVisibleChange(Handle:cvar, const String:oldVal[], const String:newVal[])
|
||||
{
|
||||
if (StringToInt(newVal) != g_visibleMaxPlayersVal) {
|
||||
SetConVarInt(hVisibleMaxPlayers, g_visibleMaxPlayersVal);
|
||||
PrintToServer("[VMC] Set visible maxplayers %i => %i", StringToInt(newVal), g_visibleMaxPlayersVal);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user