main()
{
        maps\mp\mp_provence2_fx::main();
        
	maps\mp\_load::main();

        if(level.wwx_ambmapsound) ambientPlay("ambient_mp_provence2");

        maps\mp\prov2_balan::main();
        maps\mp\prov2_horloge::main();
        maps\mp\prov2_chante::main();
        maps\mp\prov2_chien::main();
        maps\mp\prov2_porte::main();

	game["allies"] = "american";
	game["axis"] = "german";
	game["attackers"] = "allies";
	game["defenders"] = "axis";
	game["american_soldiertype"] = "normandy";
	game["german_soldiertype"] = "normandy";

	setcvar("r_glowbloomintensity0",".25");
	setcvar("r_glowbloomintensity1",".25");
	setcvar("r_glowskybleedintensity0",".3");

	getent ("prochien","targetname") playloopsound ("provchien");
	getent ("procorbeau","targetname") playloopsound ("provcorbeau");
	getent ("prooisoa","targetname") playloopsound ("provoisoa");
	getent ("prooisob","targetname") playloopsound ("provoisob");
	getent ("prooisoc","targetname") playloopsound ("provoisob");
	getent ("prooisod","targetname") playloopsound ("provoisoa");
	getent ("prooisoe","targetname") playloopsound ("provoisob");
	getent ("prooisof","targetname") playloopsound ("provoisoa");
	getent ("provent","targetname") playloopsound ("provvent");
	getent ("profuite","targetname") playloopsound ("provfuite");
	getent ("procigale","targetname") playloopsound ("provcigale");
	getent ("procigaleb","targetname") playloopsound ("provcigale");
	getent ("procigalec","targetname") playloopsound ("provcigale");
	getent ("procigaled","targetname") playloopsound ("provcigale");
	getent ("procigalee","targetname") playloopsound ("provcigale");
	getent ("procigalef","targetname") playloopsound ("provcigale");
	getent ("procigaleg","targetname") playloopsound ("provcigale");

        if(getcvar("g_gametype") == "dm" || getcvar("g_gametype") == "dom" || getcvar("g_gametype") == "ihtf" || getcvar("g_gametype") == "lms" || getcvar("g_gametype") == "ons")
	{
                if(getCvar("scr_pie_cloche_dm") == "")
	             setCvar("scr_pie_cloche_dm", "1");
                level.pie_cloche_dm = getCvarInt("scr_pie_cloche_dm");

                if(getCvar("scr_pie_tntbanque_dm") == "")
	             setCvar("scr_pie_tntbanque_dm", "1");
                level.pie_tntbanque_dm = getCvarInt("scr_pie_tntbanque_dm");

	        if(getCvar("scr_pie_bidons_dm") == "")
	             setCvar("scr_pie_bidons_dm", "1");
                level.pie_bidons_dm = getCvarInt("scr_pie_bidons_dm");

	        if(getCvar("scr_pie_voits_dm") == "")
	             setCvar("scr_pie_voits_dm", "1");
                level.pie_voits_dm = getCvarInt("scr_pie_voits_dm");
        
                if(getCvar("scr_pie_cams_dm") == "")
	             setCvar("scr_pie_cams_dm", "1");
                level.pie_cams_dm = getCvarInt("scr_pie_cams_dm");

                if(getCvar("scr_pie_armes_dm") == "")
	             setCvar("scr_pie_armes_dm", "1");
                level.pie_armes_dm = getCvarInt("scr_pie_armes_dm");

                if(getCvar("scr_pie_grenades_dm") == "")
	             setCvar("scr_pie_grenades_dm", "1");
                level.pie_grenades_dm = getCvarInt("scr_pie_grenades_dm");

                if(level.pie_cloche_dm == 1)
                    maps\mp\prov2_clocher::main();

                if(level.pie_cloche_dm == 0)
                    maps\mp\prov2_horloge::desact_clocher();

                if(level.pie_tntbanque_dm == 1)
                    maps\mp\prov2_bombOn::main();

                if(level.pie_tntbanque_dm == 0)
                    maps\mp\prov2_bombOff::main();
                
                if(level.pie_bidons_dm == 1)
                    maps\mp\prov2_bidon::main();

                if(level.pie_voits_dm == 1)
                    maps\mp\prov2_voiturOn::main();

                if(level.pie_voits_dm == 0)
                    maps\mp\prov2_voiturOff::main();

                if(level.pie_cams_dm == 1)
                    maps\mp\prov2_camiOn::main();

                if(level.pie_cams_dm == 0)
                    maps\mp\prov2_camiOff::main();

                if(level.pie_armes_dm == 0)
                    maps\mp\prov2_ArmOff::desact_armes();
                    
                if(level.pie_grenades_dm == 0)
                    maps\mp\prov2_ArmOff::desact_grenades();
	}

	if(getcvar("g_gametype") == "tdm" || getcvar("g_gametype") == "cnq" || getcvar("g_gametype") == "htf" || getcvar("g_gametype") == "lts" || getcvar("g_gametype") == "vip")
	{
                if(getCvar("scr_pie_cloche_tdm") == "")
	             setCvar("scr_pie_cloche_tdm", "1");
                level.pie_cloche_tdm = getCvarInt("scr_pie_cloche_tdm");

                if(getCvar("scr_pie_tntbanque_tdm") == "")
	             setCvar("scr_pie_tntbanque_tdm", "1");
                level.pie_tntbanque_tdm = getCvarInt("scr_pie_tntbanque_tdm");

	        if(getCvar("scr_pie_bidons_tdm") == "")
	             setCvar("scr_pie_bidons_tdm", "1");
                level.pie_bidons_tdm = getCvarInt("scr_pie_bidons_tdm");

	        if(getCvar("scr_pie_voits_tdm") == "")
	             setCvar("scr_pie_voits_tdm", "1");
                level.pie_voits_tdm = getCvarInt("scr_pie_voits_tdm");
        
                if(getCvar("scr_pie_cams_tdm") == "")
	             setCvar("scr_pie_cams_tdm", "1");
                level.pie_cams_tdm = getCvarInt("scr_pie_cams_tdm");

                if(getCvar("scr_pie_armes_tdm") == "")
	             setCvar("scr_pie_armes_tdm", "1");
                level.pie_armes_tdm = getCvarInt("scr_pie_armes_tdm");

                if(getCvar("scr_pie_grenades_tdm") == "")
	             setCvar("scr_pie_grenades_tdm", "1");
                level.pie_grenades_tdm = getCvarInt("scr_pie_grenades_tdm");

                if(level.pie_cloche_tdm == 1)
                    maps\mp\prov2_clocher::main();

                if(level.pie_cloche_tdm == 0)
                    maps\mp\prov2_horloge::desact_clocher();

                if(level.pie_tntbanque_tdm == 1)
                    maps\mp\prov2_bombOn::main();

                if(level.pie_tntbanque_tdm == 0)
                    maps\mp\prov2_bombOff::main();
                
                if(level.pie_bidons_tdm == 1)
                    maps\mp\prov2_bidon::main();

                if(level.pie_voits_tdm == 1)
                    maps\mp\prov2_voiturOn::main();

                if(level.pie_voits_tdm == 0)
                    maps\mp\prov2_voiturOff::main();

                if(level.pie_cams_tdm == 1)
                    maps\mp\prov2_camiOn::main();

                if(level.pie_cams_tdm == 0)
                    maps\mp\prov2_camiOff::main();

                if(level.pie_armes_tdm == 0)
                    maps\mp\prov2_ArmOff::desact_armes();
                    
                if(level.pie_grenades_tdm == 0)
                    maps\mp\prov2_ArmOff::desact_grenades();
	}
	
	if(getcvar("g_gametype") == "sd" || getcvar("g_gametype") == "esd")
	{
                if(getCvar("scr_pie_cloche_sd") == "")
	             setCvar("scr_pie_cloche_sd", "1");
                level.pie_cloche_sd = getCvarInt("scr_pie_cloche_sd");

                if(getCvar("scr_pie_tntbanque_sd") == "")
	             setCvar("scr_pie_tntbanque_sd", "1");
                level.pie_tntbanque_sd = getCvarInt("scr_pie_tntbanque_sd");

	        if(getCvar("scr_pie_bidons_sd") == "")
	             setCvar("scr_pie_bidons_sd", "1");
                level.pie_bidons_sd = getCvarInt("scr_pie_bidons_sd");

	        if(getCvar("scr_pie_voits_sd") == "")
	             setCvar("scr_pie_voits_sd", "1");
                level.pie_voits_sd = getCvarInt("scr_pie_voits_sd");
        
                if(getCvar("scr_pie_cams_sd") == "")
	             setCvar("scr_pie_cams_sd", "1");
                level.pie_cams_sd = getCvarInt("scr_pie_cams_sd");

                if(getCvar("scr_pie_armes_sd") == "")
	             setCvar("scr_pie_armes_sd", "1");
                level.pie_armes_sd = getCvarInt("scr_pie_armes_sd");

                if(getCvar("scr_pie_grenades_sd") == "")
	             setCvar("scr_pie_grenades_sd", "1");
                level.pie_grenades_sd = getCvarInt("scr_pie_grenades_sd");

                if(level.pie_cloche_sd == 1)
                    maps\mp\prov2_clocher::main();

                if(level.pie_cloche_sd == 0)
                    maps\mp\prov2_horloge::desact_clocher();

                if(level.pie_tntbanque_sd == 1)
                    maps\mp\prov2_bombOn::main();

                if(level.pie_tntbanque_sd == 0)
                    maps\mp\prov2_bombOff::main();
                
                if(level.pie_bidons_sd == 1)
                    maps\mp\prov2_bidon::main();

                if(level.pie_voits_sd == 1)
                    maps\mp\prov2_voiturOn::main();

                if(level.pie_voits_sd == 0)
                    maps\mp\prov2_voiturOff::main();

                if(level.pie_cams_sd == 1)
                    maps\mp\prov2_camiOn::main();

                if(level.pie_cams_sd == 0)
                    maps\mp\prov2_camiOff::main();

                if(level.pie_armes_sd == 0)
                    maps\mp\prov2_ArmOff::desact_armes();
                    
                if(level.pie_grenades_sd == 0)
                    maps\mp\prov2_ArmOff::desact_grenades();
	}

	if(getcvar("g_gametype") == "ctf" || getcvar("g_gametype") == "ctfb")
	{
                if(getCvar("scr_pie_cloche_ctf") == "")
	             setCvar("scr_pie_cloche_ctf", "1");
                level.pie_cloche_ctf = getCvarInt("scr_pie_cloche_ctf");

                if(getCvar("scr_pie_tntbanque_ctf") == "")
	             setCvar("scr_pie_tntbanque_ctf", "1");
                level.pie_tntbanque_ctf = getCvarInt("scr_pie_tntbanque_ctf");

	        if(getCvar("scr_pie_bidons_ctf") == "")
	             setCvar("scr_pie_bidons_ctf", "1");
                level.pie_bidons_ctf = getCvarInt("scr_pie_bidons_ctf");

	        if(getCvar("scr_pie_voits_ctf") == "")
	             setCvar("scr_pie_voits_ctf", "1");
                level.pie_voits_ctf = getCvarInt("scr_pie_voits_ctf");
        
                if(getCvar("scr_pie_cams_ctf") == "")
	             setCvar("scr_pie_cams_ctf", "1");
                level.pie_cams_ctf = getCvarInt("scr_pie_cams_ctf");

                if(getCvar("scr_pie_armes_ctf") == "")
	             setCvar("scr_pie_armes_ctf", "1");
                level.pie_armes_ctf = getCvarInt("scr_pie_armes_ctf");

                if(getCvar("scr_pie_grenades_ctf") == "")
	             setCvar("scr_pie_grenades_ctf", "1");
                level.pie_grenades_ctf = getCvarInt("scr_pie_grenades_ctf");

                if(level.pie_cloche_ctf == 1)
                    maps\mp\prov2_clocher::main();

                if(level.pie_cloche_ctf == 0)
                    maps\mp\prov2_horloge::desact_clocher();

                if(level.pie_tntbanque_ctf == 1)
                    maps\mp\prov2_bombOn::main();

                if(level.pie_tntbanque_ctf == 0)
                    maps\mp\prov2_bombOff::main();
                
                if(level.pie_bidons_ctf == 1)
                    maps\mp\prov2_bidon::main();

                if(level.pie_voits_ctf == 1)
                    maps\mp\prov2_voiturOn::main();

                if(level.pie_voits_ctf == 0)
                    maps\mp\prov2_voiturOff::main();

                if(level.pie_cams_ctf == 1)
                    maps\mp\prov2_camiOn::main();

                if(level.pie_cams_ctf == 0)
                    maps\mp\prov2_camiOff::main();

                if(level.pie_armes_ctf == 0)
                    maps\mp\prov2_ArmOff::desact_armes();
                    
                if(level.pie_grenades_ctf == 0)
                    maps\mp\prov2_ArmOff::desact_grenades();
        }
  	if(level.wwx_radiobased)
	{
                if(getCvar("scr_pie_cloche_hq") == "")
	             setCvar("scr_pie_cloche_hq", "1");
                level.pie_cloche_hq = getCvarInt("scr_pie_cloche_hq");

                if(getCvar("scr_pie_tntbanque_hq") == "")
	             setCvar("scr_pie_tntbanque_hq", "1");
                level.pie_tntbanque_hq = getCvarInt("scr_pie_tntbanque_hq");

	        if(getCvar("scr_pie_bidons_hq") == "")
	             setCvar("scr_pie_bidons_hq", "1");
                level.pie_bidons_hq = getCvarInt("scr_pie_bidons_hq");

	        if(getCvar("scr_pie_voits_hq") == "")
	             setCvar("scr_pie_voits_hq", "1");
                level.pie_voits_hq = getCvarInt("scr_pie_voits_hq");
        
                if(getCvar("scr_pie_cams_hq") == "")
	             setCvar("scr_pie_cams_hq", "1");
                level.pie_cams_hq = getCvarInt("scr_pie_cams_hq");

                if(getCvar("scr_pie_armes_hq") == "")
	             setCvar("scr_pie_armes_hq", "1");
                level.pie_armes_hq = getCvarInt("scr_pie_armes_hq");

                if(getCvar("scr_pie_grenades_hq") == "")
	             setCvar("scr_pie_grenades_hq", "1");
                level.pie_grenades_hq = getCvarInt("scr_pie_grenades_hq");

                if(level.pie_cloche_hq == 1)
                    maps\mp\prov2_clocher::main();

                if(level.pie_cloche_hq == 0)
                    maps\mp\prov2_horloge::desact_clocher();

                if(level.pie_tntbanque_hq == 1)
                    maps\mp\prov2_bombOn::main();

                if(level.pie_tntbanque_hq == 0)
                    maps\mp\prov2_bombOff::main();
                
                if(level.pie_bidons_hq == 1)
                    maps\mp\prov2_bidon::main();

                if(level.pie_voits_hq == 1)
                    maps\mp\prov2_voiturOn::main();

                if(level.pie_voits_hq == 0)
                    maps\mp\prov2_voiturOff::main();

                if(level.pie_cams_hq == 1)
                    maps\mp\prov2_camiOn::main();

                if(level.pie_cams_hq == 0)
                    maps\mp\prov2_camiOff::main();

                if(level.pie_armes_hq == 0)
                    maps\mp\prov2_ArmOff::desact_armes();
                    
                if(level.pie_grenades_hq == 0)
                    maps\mp\prov2_ArmOff::desact_grenades();

		level.radio = [];
		level.radio[0] = spawn("script_model", (-649, 1949, 152));
		level.radio[0].angles = (359.957, 315, 0.768062);
		
		level.radio[1] = spawn("script_model", (409, 2124, -66));
		level.radio[1].angles = (359.957, 326, 0.768062);
		
		level.radio[2] = spawn("script_model", (270.991, 4365.86, 133.989));
		level.radio[2].angles = (359.362, 96.4633, 0.621784);
		
		level.radio[3] = spawn("script_model", (2384, 1431, -26));
		level.radio[3].angles = (359.957, 90, 0.768062);
		
		level.radio[4] = spawn("script_model", (868, 368, -54));
		level.radio[4].angles = (0, 45, 0);
		
		level.radio[5] = spawn("script_model", (-878, -183, -50));
		level.radio[5].angles = (0, 90, 0);
	}
 }




