c8b3433700
Cleaning up all useless tabs, spaces, indents, you name it.
59 lines
2.2 KiB
SourcePawn
59 lines
2.2 KiB
SourcePawn
#include <sourcemod>
|
|
#include <multicolors>
|
|
|
|
#pragma newdecls required
|
|
|
|
/* CONVARS */
|
|
ConVar g_cvCrowdSpawn;
|
|
ConVar g_cvWarningEnabled;
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
// Purpose:
|
|
//----------------------------------------------------------------------------------------------------
|
|
public Plugin myinfo =
|
|
{
|
|
name = "CrowdSpawnWarning",
|
|
author = "Neon",
|
|
description = "",
|
|
version = "1.0.0",
|
|
url = "https://steamcommunity.com/id/n3ontm"
|
|
};
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
// Purpose:
|
|
//----------------------------------------------------------------------------------------------------
|
|
void OnAllPluginsLoaded()
|
|
{
|
|
g_cvCrowdSpawn = FindConVar("zr_infect_mzombie_respawn");
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
// Purpose:
|
|
//----------------------------------------------------------------------------------------------------
|
|
public void OnPluginStart()
|
|
{
|
|
g_cvWarningEnabled = CreateConVar("sm_crowd_spawn_warning", "1", "", FCVAR_NONE, true, 0.0, true, 1.0);
|
|
|
|
HookEvent("round_start", OnRoundStart);
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
// Purpose:
|
|
//----------------------------------------------------------------------------------------------------
|
|
public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
|
{
|
|
CreateTimer(5.0, OnRoundStartPost, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------------------------
|
|
// Purpose:
|
|
//----------------------------------------------------------------------------------------------------
|
|
public Action OnRoundStartPost(Handle timer)
|
|
{
|
|
if (!GetConVarBool(FindConVar("zr_infect_mzombie_respawn")))
|
|
{
|
|
CPrintToChatAll("{red}[WARNING] {white}Zombies will be spawning {red}inbetween {white}the humans!!!");
|
|
CPrintToChatAll("{red}[WARNING] {white}Zombies will be spawning {red}inbetween {white}the humans!!!");
|
|
CPrintToChatAll("{red}[WARNING] {white}Zombies will be spawning {red}inbetween {white}the humans!!!");
|
|
}
|
|
} |