toolazytoexplain
This commit is contained in:
parent
7854557480
commit
6736a43837
@ -6,9 +6,11 @@
|
||||
#pragma newdecls required
|
||||
|
||||
bool g_bHasFakeClient[MAXPLAYERS + 1] = {false,...};
|
||||
int g_MaxPlayers = 64;
|
||||
|
||||
Handle g_hCVar_FakeClients = INVALID_HANDLE;
|
||||
Handle g_hCVar_SourceTV = INVALID_HANDLE;
|
||||
ConVar g_hCVar_FakeClients = INVALID_HANDLE;
|
||||
ConVar g_hCVar_SourceTV = INVALID_HANDLE;
|
||||
ConVar g_hCVar_MaxPlayers = INVALID_HANDLE;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@ -27,7 +29,7 @@ public Plugin myinfo =
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnGameFrame()
|
||||
{
|
||||
SteamWorks_SetMaxPlayers(65);
|
||||
SteamWorks_SetMaxPlayers(g_MaxPlayers);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -37,6 +39,7 @@ public void OnPluginStart()
|
||||
{
|
||||
g_hCVar_FakeClients = CreateConVar("sm_nosteamplayercount_fakeclients", "1", "Increse PlayerCount for Fake Clients", 0, true, 0.0, true, 1.0);
|
||||
g_hCVar_SourceTV = CreateConVar("sm_nosteamplayercount_sourcetv", "1", "Increse PlayerCount for SourceTV", 0, true, 0.0, true, 1.0);
|
||||
g_hCVar_MaxPlayers = CreateConVar("sm_nosteamplayercount_maxplayers", "64", "Max Players to display in the sv browser", 0, true, 1.0, true, 128.0);
|
||||
|
||||
AutoExecConfig(true, "plugin.NoSteamPlayerCount");
|
||||
|
||||
@ -63,6 +66,15 @@ public void OnPluginEnd()
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue)
|
||||
{
|
||||
if(convar == g_hCVar_MaxPlayers)
|
||||
g_MaxPlayers = g_hCVar_MaxPlayers.IntValue;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user