_player = _this select 0;
_newpos = getmarkerpos "disco";

sleep 20;

_sc = (count EGG_EVO_Psmoke)-1;
_lc = (count EGG_EVO_Plight)-1;

_d = 0;
while {_d <= 6} do 
{
	_sm = createVehicle [(EGG_EVO_Psmoke select round random _sc),_newpos, [], 15, "NONE"];
	_d = _d+1;
	sleep 0.2;
};
_e = 0;
while {_e <= 12} do 
{
	_cl = createVehicle [(EGG_EVO_Plight select round random _lc),_newpos, [], 15, "NONE"];
	_e = _e+1;
	sleep 0.2;
};
sleep 5;

//playsound "disco";

/*
partypos setVehicleInit "[this,7] execVM ""actions\disco\nuke.sqf""";
processInitCommands;
plaser setVehicleInit "[this,8] execVM ""actions\disco\nuke.sqf""";
processInitCommands;
*/
playSound "Disco2";

titleCut["", "BLACK OUT",2];

if(isServer) then 
{
	"Respawn_West" setmarkerpos _newpos;
	_allunitscd = EGG_EVO_civ1;
	_maxcd = (count _allunitscd)-1;
	_guardcd = createGroup (civilian);

	_dc = 0;
	while {_dc <= 10} do 
	{
		_unit = _guardcd createUnit [(_allunitscd select round random _maxcd), _newpos, [], 5, "NONE"];
		_dc = _dc + 1;
		sleep 0.1;
	};

	{commandstop _x;_x setDir (random 360);_x setPos [(_newpos select 0)+ (random 10),(_newpos select 1)+ (random 10),0]} forEach (units _guardcd);

//bring in POW's
	if (POWfactor ==1) then
	{
//		POW1 setPos [(_newpos select 0)-(random 10),(_newpos select 1)-(random 10),0];
//		_temp= [POW1] execVM "actions\disco\dance.sqf";
//		sleep 0.1;
		{
			_x setPos [(_newpos select 0)-(random 10),(_newpos select 1)-(random 10),0];
			_temp= [_x] execVM "actions\disco\dance.sqf";
			sleep 0.1;
		} forEach (units group POW1);
	};
};

setDate [2014, 9, 3, 21, 40];

if(vehicle player != player) then
{
	(vehicle player) setVelocity [0,0,0];
	player action ["Eject",vehicle player];
};

sleep 1.0;
removeAllWeapons player;
removeAllAssigneditems player;
removebackpack player;
removeheadgear player;
removegoggles player;
//removeuniform player;
//removeAllActions _player;
//_player removeaction 0;
//_player removeaction 1;
//_player removeaction 2;

sleep 1;
_tag = player addaction ["Kung Fu","actions\disco\pdance.sqf",1,1, true, true,"test2"];
_tag = player addaction ["Stop Dancing","actions\disco\pdance.sqf",0,1, true, true,"test2"];
//_tag = player addaction ["Boogie","actions\disco\pdance.sqf",2,1, true, true,"test2"];
//_tag = player addaction ["Rocky","actions\disco\pdance.sqf",3,1, true, true,"test2"];
//_tag = player addaction ["Tricking","actions\disco\pdance.sqf",4,1, true, true,"test2"];
//_tag = player addaction ["Madness","actions\disco\pdance.sqf",5,1, true, true,"test2"];
//_tag = player addaction ["Russian Crap","actions\disco\pdance.sqf",6,1, true, true,"test2"];

//_Tshirt = count (EGG_EVO_civuniforms)-1;
//player adduniform (EGG_EVO_civuniforms select round random _Tshirt);

player setPos [(_newpos select 0)+(random 10),(_newpos select 1)+ (random 10),(_newpos select 2)];
sleep 1.0;
_txt = format ["%1 has been liberated. Great Job! Time to get wasted...", (EGG_EVO_Townnames select 0)];
titleText [_txt, "PLAIN"];
sleep 4.0;
titleText ["", "PLAIN"];
sleep 1.0;
titleCut["", "BLACK in",0];
party = true;
titleText ["PARTY TIME!!", "PLAIN"];

sleep 45.0;
titleText ["You have been playing", "PLAIN DOWN"];
sleep 2.0;
titleText ["U", "PLAIN DOWN"];
sleep 1.0;
titleText ["L U T", "PLAIN DOWN"];
sleep 1.0;
titleText ["O L U T I", "PLAIN DOWN"];
sleep 1.0;
titleText ["V O L U T I O", "PLAIN DOWN"];
sleep 1.0;
titleText ["E V O L U T I O N", "PLAIN DOWN"];
sleep 4.0;
titleText ["Original mission concept: KilJoy", "PLAIN DOWN"];
sleep 4.0;
titleText ["GITS version developed by Eggbeast and GITS crew", "PLAIN DOWN"];
sleep 4.0;
titleText ["With huge support from the BIS community", "PLAIN DOWN"];
sleep 4.0;
titleText ["Dedicated to Ivan Buchta and Martin Pezlar", "PLAIN DOWN"];
sleep 22.0;
4 fadeSound 0;
titleCut["", "BLACK OUT",2];
titleText ["The End", "PLAIN"];
sleep 4.0;
//disco=false;
EGG_EVO_end=true;
publicVariable "EGG_EVO_end";
ForceEnd;
