#library "mp"
#include "zcommon.acs"



//Detects zandronum game modifiers and gives players different weapons.
SCRIPT "ZA_Modifier_Script_1" ENTER clientside//(void)
{


		if ((GameType () == GAME_NET_DEATHMATCH))
		{

	if( GetCVar ("Instagib") == 1 )	 
	{		
		GiveInventory("AWP", 1);
		GiveInventory("Taser", 1);
		GiveInventory("TaserAmmo", 3);
		TakeInventory("Glock", 1);
		TakeInventory("USP", 1);
		SetWeapon("AWP");
	delay(1);
		}


	if( GetCVar ("Buckshot") == 1 )	 
	{		
		TakeInventory("Glock", 1);
		TakeInventory("USP", 1);
		GiveInventory("HE Grenade", 1);
		GiveInventory("HEGrenadeAmmo", 8);
		GiveInventory("IncendiaryGrenadeAmmo", 5);
		GiveInventory("MolotovAmmo", 5);
		GiveInventory("BlueArmor", 1);
		SetWeapon("HE Grenade");
	delay(1);
		}



//Else, none of this happens and terminates the script.		
	else	{	delay(2);	}

	}





	
delay(13);
Terminate;
}



Script "ZA_Modifier_Script_2" respawn
{
 ACS_NamedExecuteAlways("ZA_Modifier_Script_1", 0, 0, 0, 0);
Delay(2);	Terminate; 
}




script "FreezeIfbot" (void) { if(PlayerIsBot(PlayerNumber())) 
	{
	SetPlayerProperty(0,1,PROP_TOTALLYFROZEN);
	delay(18*5);//freezes bot for 2.5 seconds
	SetPlayerProperty(0,0,PROP_TOTALLYFROZEN);
	}
 }



script "Flashbanged" (void) { 
FadeTo (1.0, 1.0, 1.0, 1.0, 0.065);
	delay(18*4);//freezes bot for 2.5 seconds
FadeTo (1.0, 1.0, 1.0, 0.0, 2.0);
 }







script "MP_Killstreak_1" (void) NET clientside
{
	int KillStreak = CheckInventory("KillStreak");
	int EnemyDied = CheckInventory("EnemyDied");

			 If (GameType() == GAME_NET_DEATHMATCH )
{

		LocalAmbientSound("misc/w_pkup",220);
		GiveInventory("Healthshot", 1);

	SetFont("CONFONT");
	HudMessage(s:"Healthshot obtained."; HUDMSG_TYPEON | HUDMSG_LOG, 0, CR_White, 0.5, 0.375, 3.0, 0.01, 2.0);
//}

//	if(KillStreak >= 15 && EnemyDied == 1)	
//{
//	SetFont("CONFONT");
//	HudMessage(s:"Healthshot obtained. Max limit reached."; HUDMSG_TYPEON | HUDMSG_LOG, 0, CR_White, 0.5, 0.375, 3.0, 0.01, 2.0);
//}
		DELAY(1);	
Terminate;
}

		DELAY(1);	
Terminate;
}



/*
script "MP_Killstreak_2" RESPAWN NET clientside
{

			 If (GameType() == GAME_NET_DEATHMATCH )
{
	int KillStreak = CheckInventory("KillStreak");
	int EnemyDied = CheckInventory("EnemyDied");
	//int i = playernumber();

	//KillStreak[i]++;



	if(KillStreak == 3 && EnemyDied == 1)	
{
		LocalAmbientSound("misc/w_pkup",220);
		GiveInventory("Healthshot", 1);
	SetFont("CONFONT");
	HudMessage(s:"Healthshot obtained."; HUDMSG_TYPEON | HUDMSG_LOG, 0, CR_White, 0.5, 0.375, 3.0, 0.01, 2.0);
		DELAY(1);	
Terminate;
}

		DELAY(3);	
Restart;

}

		DELAY(1);	
}

*/