#library "TE_MGI"
#include "zcommon.acs"

script 999 ENTER
{
	ACS_Execute(1044,0,0,0,0);
}

script 1044 (void)
{

	while (TRUE)
	{
		int X = GetCVar("TE_MGX");
		int Y = GetCVar("TE_MGY");
		int Z = GetCVar("TE_MGimg");
		while (CheckWeapon("Machinegun"))
		{
			if(CheckInventory("FiredMGGrenade"))
			{
				if (Z == 0) SetFont("TEMGOff0");
				if (Z == 1) SetFont("TEMGOff1");
				if (Z == 2) SetFont("TEMGOff2");
				if (Z == 3) SetFont("TEMGOff3");
				HudMessage(s:"A"; HUDMSG_PLAIN, 0, 0, (X*0.01), (Y*0.01), 0.2);
			} else {
				if (Z == 0) SetFont("TEMGOn0");
				if (Z == 1) SetFont("TEMGOn1");
				if (Z == 2) SetFont("TEMGOn2");
				if (Z == 3) SetFont("TEMGOn3");
				HudMessage(s:"A"; HUDMSG_PLAIN, 0, 0, (X*0.01), (Y*0.01), 0.2);
			}
			delay(6);
		}
		delay(35);
	}
}

script 1045 (void)
{
	ACS_Terminate(1044,0);
	delay(2);
	ACS_Execute(1044,0,0,0,0);
}