initial commit
This commit is contained in:
		
							parent
							
								
									877989932d
								
							
						
					
					
						commit
						65d7f03781
					
				
							
								
								
									
										59
									
								
								CrowdSpawnWarning/scripting/CrowdSpawnWarning.sp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								CrowdSpawnWarning/scripting/CrowdSpawnWarning.sp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,59 @@
 | 
			
		||||
#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!!!");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user