You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
769 B

/* 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);
}
}