//Remember, science rhymes with compliance.
//You know what DOESN'T rhyme with compliance?
//Deadly neurotoxins.

//These ones in particular were harvested from botulism extract, found in discarded employee lunches.

currentTime <- 0;
maxNeurotoxinTime <- 32;
disabled <- false;

function startNeurotoxins(){
	disabled <- false;
	currentTime <- maxNeurotoxinTime;
//	EntFire("@neurotoxins_fade","Fade","",0.0,null);
	step();
}

function step(){
	if(disabled)	return;
	currentTime--;
	setCounters(currentTime);
	if(currentTime == 0)	EntFire("@playerkill","Enable","",0.0,null); //Kill the player with neurotoxins!
	EntFireByHandle(self,"RunScriptCode","step();",1.0,null,null);
}

function setCounters(n){
	EntFire("@number_*","Disable","",0.0,null);
	local ones = (n > 10 ? n % 10 : n);
	EntFire("@number_"+ones,"Enable","",0.0,null);
	local tens = (n > 9 ? n - ones : "00");
	EntFire("@number_"+tens,"Enable","",0.0,null);
}

function stopNeurotoxins(){
	disabled <- true;
//	EntFire("@neurotoxins_fade","FadeReverse","",0.0,null);
	setCounters(0); //Turn off the counters, sort of.
}

function fork(){
	if(disabled)	return;
	currentTime += 30;
}

setCounters(0);
