#include maps\mp\_utility;
#include extreme\_ex_weapons;
#include extreme\_ex_drm;

init()
{
	createWeaponsArray();
	precacheWeapons();

	for(i = 0; i < level.weaponnames.size; i++)
	{
		weaponname = level.weaponnames[i];

		if(drm_getCvar(level.weapons[weaponname].server_allowcvar) == "")
		{
			level.weapons[weaponname].allow = level.weapons[weaponname].allow_default;
			setCvar(level.weapons[weaponname].server_allowcvar, level.weapons[weaponname].allow);
		}
		else level.weapons[weaponname].allow = drm_getCvarInt(level.weapons[weaponname].server_allowcvar);
	}

	level thread deleteRestrictedWeapons();
	level thread updateAllowed();
	level thread onPlayerConnect();

	// weapon limiter on, it takes over looking after the weapons
	if(level.ex_wepo_limiter) return;

	for(;;)
	{
		updateAllowed();
		wait 5;
	}
}

onPlayerConnect()
{
	for(;;)
	{
		level waittill("connecting", player);

		player.usedweapons = false;

		if(!level.ex_wepo_limiter) player thread updateAllAllowedSingleClient();
		player thread onPlayerSpawned();
	}
}

onPlayerSpawned()
{
	self endon("disconnect");

	for(;;)
	{
		self waittill("spawned_player");
		self thread watchWeaponUsage();
	}
}

deleteRestrictedWeapons()
{
	for(i = 0; i < level.weaponnames.size; i++)
		weaponname = level.weaponnames[i];
}

dropWeapon()
{
	self endon("disconnect");

	if(!level.ex_wepo_drop_weps) return;

	clipsize1 = 0;
	clipsize2 = 0;
	reservesize1 = 0;
	reservesize2 = 0;
	currentslot = undefined;
	current = undefined;

	// get primary information
	weapon1 = self getweaponslotweapon("primary");
	if(weapon1 != "none" && weapon1 != "sprint_mp" && weapon1 != "dummy1_mp" && weapon1 != "dummy2_mp" && weapon1 != "dummy3_mp" && weapon1 != "dummy4_mp")
	{
		 clipsize1 = self getweaponslotclipammo("primary");
		 reservesize1 = self getweaponslotammo("primary");
	}
	else weapon1 = "none";

	// get primaryb information
	weapon2 = self getweaponslotweapon("primaryb");
	if(weapon2 != "none" && weapon2 != "sprint_mp" && weapon2 != "dummy1_mp" && weapon2 != "dummy2_mp" && weapon2 != "dummy3_mp" && weapon2 != "dummy4_mp")
	{
		 clipsize2 = self getweaponslotclipammo("primary");
		 reservesize2 = self getweaponslotammo("primary");
	}
	else weapon2 = "none";

	if(level.ex_wepo_drop_weps == 1)
	{
		current = self getcurrentweapon();

		if(current == weapon1) currentslot = "primary";
		else currentslot = "primaryb";

		if(isdefined(currentslot))
		{
			if(currentslot == "primary") if(clipsize1 || reservesize1) self dropItem(weapon1);
			else if(clipsize2 || reservesize2) self dropItem(weapon2);
		}
	}
	else if(level.ex_wepo_drop_weps == 2)
	{
		if(clipsize1 || reservesize1) self dropItem(weapon1);
	}
	else if(level.ex_wepo_drop_weps == 3)
	{
		if(clipsize2 || reservesize2) self dropItem(weapon2);
	}
	else if(level.ex_wepo_drop_weps == 4)
	{
		if(clipsize1 || reservesize1) self dropItem(weapon1);
		if(clipsize2 || reservesize2) self dropItem(weapon2);
	}
}

dropOffhand(forced)
{
	self endon("disconnect");

	if(!isDefined(forced)) forced = false;

	if(!level.ex_wepo_drop_frag && !level.ex_wepo_drop_smoke && !forced) return;

	fragsize = self getammocount(self.pers["fragtype"]);
	enemy_fragsize = self getammocount(self.pers["enemy_fragtype"]);
	smokesize = self getammocount(self.pers["smoketype"]);
	enemy_smokesize = self getammocount(self.pers["enemy_smoketype"]);

	if(level.ex_wepo_drop_frag || forced)
	{
		if(fragsize) self dropItem(self.pers["fragtype"]);
		if(enemy_fragsize) self dropItem(self.pers["enemy_fragtype"]);
	}

	if(level.ex_wepo_drop_smoke || forced)
	{
		if(smokesize) self dropItem(self.pers["smoketype"]);
		if(enemy_smokesize) self dropItem(self.pers["enemy_smoketype"]);
	}
}

getFragGrenadeCount()
{
	if(self.pers["team"] == "allies") grenadetype = "frag_grenade_" + game["allies"] + "_mp";
	else
	{
		assert(self.pers["team"] == "axis");
		grenadetype = "frag_grenade_" + game["axis"] + "_mp";
	}

	count = self getammocount(grenadetype);
	return count;
}

getSmokeGrenadeCount()
{
	if(self.pers["team"] == "allies") grenadetype = "smoke_grenade_" + game["allies"] + GetSmokeColour(level.ex_smoke[game["allies"]]) + "mp";
	else
	{
		assert(self.pers["team"] == "axis");
		grenadetype = "smoke_grenade_" + game["axis"] + GetSmokeColour(level.ex_smoke[game["axis"]]) + "mp";
	}

	count = self getammocount(grenadetype);
	return count;
}

getBinocularCount()
{
	count = 0;

	// get the players array
	players = getentarray("player", "classname");

	for(i = 0; i < players.size; i++)
		if(isDefined(players[i].ex_haswmdbinocs) && players[i].ex_haswmdbinocs) count++;
		
	return count;
}

isMainWeapon(weapon)
{
	// Include any main weapons that can be picked up

	switch(weapon)
	{
		case "greasegun_mp":
		case "m1carbine_mp":
		case "m1garand_mp":
		case "thompson_mp":
		case "bar_mp":
		case "springfield_mp":
		case "sten_mp":
		case "enfield_mp":
		case "bren_mp":
		case "enfield_scope_mp":
		case "mosin_nagant_mp":
		case "SVT40_mp":
		case "PPS42_mp":
		case "ppsh_mp":
		case "mosin_nagant_sniper_mp":
		case "kar98k_mp":
		case "g43_mp":
		case "mp40_mp":
		case "mp44_mp":
		case "kar98k_sniper_mp":
		case "shotgun_mp":
		case "panzerschreck_mp":
		case "panzerschreck_allies":
		case "knife_mp":
		case "mobile_30cal":
		case "mobile_mg42":
		return true;

		default:
		return false;
	}
}

restrictWeaponByServerCvars(response)
{
	// weapon limiter check
	if(!level.ex_wepo_class && level.ex_wepo_limiter && level.weapons[response].allow  == 0) return "restricted";

	switch(response)
	{
		// American
		case "m1carbine_mp":
		if(!drm_getcvarint("scr_allow_m1carbine")) response = "restricted";
		break;

		case "mobile_30cal":
		if(!drm_getcvarint("scr_allow_mg30cal")) response = "restricted";
		break;

		case "m1garand_mp":
		if(!drm_getcvarint("scr_allow_m1garand")) response = "restricted";
		break;

		case "thompson_mp":
		if(!drm_getcvarint("scr_allow_thompson")) response = "restricted";
		break;

		case "bar_mp":
		if(!drm_getcvarint("scr_allow_bar")) response = "restricted";
		break;

		case "springfield_mp":
		if(!drm_getcvarint("scr_allow_springfield")) response = "restricted";
		break;

		case "greasegun_mp":
		if(!drm_getcvarint("scr_allow_greasegun")) response = "restricted";
		break;

		case "shotgun_mp":
		if(!drm_getcvarint("scr_allow_shotgun")) response = "restricted";
		break;

		// British
		case "enfield_mp":
		if(!drm_getcvarint("scr_allow_enfield")) response = "restricted";
		break;

		case "sten_mp":
		if(!drm_getcvarint("scr_allow_sten")) response = "restricted";
		break;

		case "bren_mp":
		if(!drm_getcvarint("scr_allow_bren")) response = "restricted";
		break;

		case "enfield_scope_mp":
		if(!drm_getcvarint("scr_allow_enfieldsniper")) response = "restricted";
		break;

		// Russian
		case "mosin_nagant_mp":
		if(!drm_getcvarint("scr_allow_nagant")) response = "restricted";
		break;

		case "SVT40_mp":
		if(!drm_getcvarint("scr_allow_svt40")) response = "restricted";
		break;

		case "PPS42_mp":
		if(!drm_getcvarint("scr_allow_pps42")) response = "restricted";
		break;

		case "ppsh_mp":
		if(!drm_getcvarint("scr_allow_ppsh")) response = "restricted";
		break;

		case "mosin_nagant_sniper_mp":
		if(!drm_getcvarint("scr_allow_nagantsniper")) response = "restricted";
		break;

		// German
		case "kar98k_mp":
		if(!drm_getcvarint("scr_allow_kar98k")) response = "restricted";
		break;

		case "g43_mp":
		if(!drm_getcvarint("scr_allow_g43")) response = "restricted";
		break;

		case "g43_sniper":
		if(!drm_getcvarint("scr_allow_g43sniper")) response = "restricted";
		break;

		case "mp40_mp":
		if(!drm_getcvarint("scr_allow_mp40")) response = "restricted";
		break;

		case "mp44_mp":
		if(!drm_getcvarint("scr_allow_mp44")) response = "restricted";
		break;

		case "kar98k_sniper_mp":
		if(!drm_getcvarint("scr_allow_kar98ksniper")) response = "restricted";
		break;

		case "fraggrenade":
		if(!drm_getcvarint("scr_allow_fraggrenades")) response = "restricted";
		break;

		case "smokegrenade":
		if(!drm_getcvarint("scr_allow_smokegrenades")) response = "restricted";
		break;

		case "colt_mp":
		if(!drm_getcvarint("scr_allow_colt")) response = "restricted";
		break;

		case "knife_mp":
		if(!drm_getcvarint("scr_allow_knife")) response = "restricted";
		break;

		case "webley_mp":
		if(!drm_getcvarint("scr_allow_webley")) response = "restricted";
		break;

		case "TT30_mp":
		if(!drm_getcvarint("scr_allow_tt30")) response = "restricted";
		break;

		case "luger_mp":
		if(!drm_getcvarint("scr_allow_luger")) response = "restricted";
		break;

		case "mobile_mg42":
		if(!drm_getcvarint("scr_allow_mg42")) response = "restricted";
		break;

		case "panzerschreck_mp":
		if(!drm_getcvarint("scr_allow_panzerschreck")) response = "restricted";
		break;

		case "panzerschreck_allies":
		if(!drm_getcvarint("scr_allow_bazooka")) response = "restricted";
		break;

		default:
		response = "restricted";
		break;
	}

	return response;
}

watchWeaponUsage()
{
	self endon("disconnect");

	self.usedweapons = false;

	for(;;)
	{
		oldoffhand = self getCurrentOffHand();

		if(oldoffhand != "none") oldammo = self getAmmoCount(oldoffhand);
		else oldammo = 0;

		wait 0.05;

		newoffhand = self getCurrentOffHand();

		if(newoffhand != "none") newammo = self getAmmoCount(newoffhand);
		else newammo = 0;
		
		if(self attackButtonPressed() || oldammo != newammo) break;
	}

	self.usedweapons = true;
}

getWeaponName(weapon)
{
	switch(weapon)
	{
		// American
		case "m1carbine_mp":
		weaponname = &"WEAPON_M1A1CARBINE";
		break;

		case "m1garand_mp":
		weaponname = &"WEAPON_M1GARAND";
		break;

		case "mobile_30cal":
		weaponname = &"WEAPON_30CAL";
		break;
		
		case "thompson_mp":
		weaponname = &"WEAPON_THOMPSON";
		break;

		case "bar_mp":
		weaponname = &"WEAPON_BAR";
		break;

		case "springfield_mp":
		weaponname = &"WEAPON_SPRINGFIELD";
		break;

		case "greasegun_mp":
		weaponname = &"WEAPON_GREASEGUN";
		break;

		case "shotgun_mp":
		weaponname = &"WEAPON_SHOTGUN";
		break;

		case "colt_mp":
		weaponname = &"WEAPON_COLT45";
		break;

		case "knife_mp":
		weaponname = &"WEAPON_KNIFE";
		break;

		// British
		case "enfield_mp":
		weaponname = &"WEAPON_LEEENFIELD";
		break;

		case "sten_mp":
		weaponname = &"WEAPON_STEN";
		break;

		case "bren_mp":
		weaponname = &"WEAPON_BREN";
		break;

		case "enfield_scope_mp":
		weaponname = &"WEAPON_SCOPEDLEEENFIELD";
		break;

		case "webley_mp":
		weaponname = &"WEAPON_WEBLEY";
		break;

		// Russian
		case "mosin_nagant_mp":
		weaponname = &"WEAPON_MOSINNAGANT";
		break;

		case "SVT40_mp":
		weaponname = &"WEAPON_SVT40";
		break;

		case "PPS42_mp":
		weaponname = &"WEAPON_PPS42";
		break;

		case "ppsh_mp":
		weaponname = &"WEAPON_PPSH";
		break;

		case "mosin_nagant_sniper_mp":
		weaponname = &"WEAPON_SCOPEDMOSINNAGANT";
		break;

		case "TT30_mp":
		weaponname = &"WEAPON_TT30";
		break;

		//German
		case "kar98k_mp":
		weaponname = &"WEAPON_KAR98K";
		break;

		case "mobile_mg42":
		weaponname = &"WEAPON_MG42";
		break;

		case "g43_mp":
		weaponname = &"WEAPON_G43";
		break;

		case "g43_sniper":
		weaponname = &"WEAPON_G43SNIPER";
		break;

		case "mp40_mp":
		weaponname = &"WEAPON_MP40";
		break;

		case "mp44_mp":
		weaponname = &"WEAPON_MP44";
		break;

		case "kar98k_sniper_mp":
		weaponname = &"WEAPON_SCOPEDKAR98K";
		break;

		case "luger_mp":
		weaponname = &"WEAPON_LUGER";
		break;

		case "panzerschreck_mp":
		weaponname = &"WEAPON_PANZERSCHRECK";
		break;

		case "panzerschreck_allies":
		weaponname = &"WEAPON_PANZERSCHRECK";
		break;

		default:
		weaponname = &"WEAPON_UNKNOWNWEAPON";
		break;
	}

	return weaponname;
}

useAn(weapon)
{
	if(!isDefined(weapon)) return false;

	switch(weapon)
	{
		case "m1carbine_mp":
		case "m1garand_mp":
		case "mp40_mp":
		case "mp44_mp":
		case "shotgun_mp":
		return true;
	}

	return false;
}

updateAllowed()
{
	classname = undefined;

	// if not class bassed and weapon limiter enabled, create an array to add the weapon names used only for this game
	if(!level.ex_wepo_class && level.ex_wepo_limiter) level.ex_wlim_names = [];

	switch(level.ex_wepo_class)
	{
		case 1:	classname = "pistol";		break;	// pistol only
		case 2:	classname = "sniper";		break;	// sniper only
		case 3:	classname = "mg";			break;	// mg only
		case 4:	classname = "smg";			break;	// smg only
		case 5:	classname = "rifle";			break;	// rifle only
		case 6: classname = "boltrifle";	break;	// bolt action rifle only
		case 7: classname = "shotgun";	break;	// shotgun only
		case 8: classname = "rl";	break;	// panzerschreck only
	}

	for(i = 0; i < level.weaponnames.size; i++)
	{
		weaponname = level.weaponnames[i];

		if(level.ex_wepo_class)
		{
			// check if it matches the class based weapon
			if(isWeaponType(weaponname, classname)) level.weapons[weaponname].allow = 1;
			else level.weapons[weaponname].allow = 0;

			// check frag grenade
			if(level.ex_wepo_allow_frag && level.weapons[weaponname].classname == "nade") level.weapons[weaponname].allow = 1;
			else if(level.weapons[weaponname].classname == "nade") level.weapons[weaponname].allow = 0;

			// check smoke grenade
			if(level.ex_wepo_allow_smoke && level.weapons[weaponname].classname == "smoke") level.weapons[weaponname].allow = 1;
			else if(level.weapons[weaponname].classname == "smoke") level.weapons[weaponname].allow = 0;

			// check if allowed pistol
			if(level.ex_wepo_class != 1 && level.ex_wepo_sidearm && isWeaponType(weaponname, "pistol")) level.weapons[weaponname].allow = 1;

			cvarvalue = level.weapons[weaponname].allow;
		}
		else cvarvalue = drm_getCvarInt(level.weapons[weaponname].server_allowcvar);

		// if not class based weapons and weapon limiter enabled
		if(!level.ex_wepo_class && level.ex_wepo_limiter)
		{
			// check to see whether this weapon limit is zero, not available!
			if(level.weapons[weaponname].limit == 0) cvarvalue = 0;

			// if it is allowed and is game allies and axis, then add it to the weapons in use array
			if((isWeaponType(weaponname, game["allies"]) || isWeaponType(weaponname, game["axis"])) && cvarvalue)
				level.ex_wlim_names[level.ex_wlim_names.size] = weaponname;

			// add the cvarvalue to the weapons array
			level.weapons[weaponname].cvarvalue = cvarvalue;
		}

		if(level.weapons[weaponname].allow != cvarvalue)
		{
			level.weapons[weaponname].allow = cvarvalue;
			thread updateAllowedAllClients(weaponname);
		}
	}
}

updateAllowedAllClients(weaponname)
{
	players = getentarray("player", "classname");
	for(i = 0; i < players.size; i++)
		players[i] updateAllowedSingleClient(weaponname);
}

updateAllAllowedSingleClient()
{
	for(i = 0; i < level.weaponnames.size; i++)
	{
		weaponname = level.weaponnames[i];
		self updateAllowedSingleClient(weaponname);
	}
}

updateAllowedSinglelClients(weaponname)
{
	players = getentarray("player", "classname");
	for(i = 0; i < players.size; i++)
	{
		player = players[i];

		if(isPlayer(player) && player.sessionstate == "spectator")
		{
			if(isDefined(player.pers["weapon"]) && player.pers["weapon"] == weaponname) continue;
			else if(isDefined(player.pers["weapon2"]) && player.pers["weapon2"] == weaponname) continue;
		}
		else if(isPlayer(player) && isDefined(player.weapon["primary"].name))
		{
			if(weaponname == player.weapon["primary"].name) continue;
			else if(weaponname == player.weapon["primaryb"].name) continue;
			else if(weaponname == player.weapon["virtual"].name) continue;
		}		
		
		if(isPlayer(player)) player updateAllowedSingleClient(weaponname);
	}
}

updateAllowedSingleClient(weaponname)
{
	if(isDefined(level.weapons[weaponname]))
		self setClientCvar(level.weapons[weaponname].client_allowcvar, level.weapons[weaponname].allow);
}

updateDisabledSingleClient(weaponname)
{
	if(isDefined(level.weapons[weaponname]))
		self setClientCvar(level.weapons[weaponname].client_allowcvar, 0);
}

updateEnabledSingleClient(weaponname)
{
	if(isDefined(level.weapons[weaponname]))
		self setClientCvar(level.weapons[weaponname].client_allowcvar, 1);
}

createWeaponsArray()
{
	level.weaponnames = [];
	level.weapons = [];

	level.weaponnames[0] = "greasegun_mp";
	level.weaponnames[1] = "m1carbine_mp";
	level.weaponnames[2] = "m1garand_mp";
	level.weaponnames[3] = "springfield_mp";
	level.weaponnames[4] = "thompson_mp";
	level.weaponnames[5] = "bar_mp";
	level.weaponnames[6] = "sten_mp";
	level.weaponnames[7] = "enfield_mp";
	level.weaponnames[8] = "enfield_scope_mp";
	level.weaponnames[9] = "bren_mp";
	level.weaponnames[10] = "PPS42_mp";
	level.weaponnames[11] = "mosin_nagant_mp";
	level.weaponnames[12] = "SVT40_mp";
	level.weaponnames[13] = "mosin_nagant_sniper_mp";
	level.weaponnames[14] = "ppsh_mp";
	level.weaponnames[15] = "mp40_mp";
	level.weaponnames[16] = "kar98k_mp";
	level.weaponnames[17] = "g43_mp";
	level.weaponnames[18] = "kar98k_sniper_mp";
	level.weaponnames[19] = "mp44_mp";
	level.weaponnames[20] = "shotgun_mp";
	level.weaponnames[21] = "fraggrenade";
	level.weaponnames[22] = "smokegrenade";
	level.weaponnames[23] = "colt_mp";
	level.weaponnames[24] = "webley_mp";
	level.weaponnames[25] = "TT30_mp";
	level.weaponnames[26] = "luger_mp";
	level.weaponnames[27] = "binoculars_mp";
	level.weaponnames[28] = "g43_sniper";	
	level.weaponnames[29] = "panzerschreck_mp";
	level.weaponnames[30] = "panzerschreck_allies";
	level.weaponnames[31] = "knife_mp";
 	level.weaponnames[32] = "mobile_30cal";
	level.weaponnames[33] = "mobile_mg42";


	// sniper rifles
	level.weapons["springfield_mp"] = spawnstruct();
	level.weapons["springfield_mp"].server_allowcvar = "scr_allow_springfield";
	level.weapons["springfield_mp"].client_allowcvar = "ui_allow_springfield";
	level.weapons["springfield_mp"].allow_default = 1;
	level.weapons["springfield_mp"].classname = "sniper";
	level.weapons["springfield_mp"].team = "allies";
	level.weapons["springfield_mp"].limit = [[level.ex_drm]]("ex_springfield_limit", 99, 0, 99, "int");
	level.weapons["springfield_mp"].ammo_limit = [[level.ex_drm]]("ex_springfield_ammo_limit", 60, 0, 999, "int");

	level.weapons["enfield_scope_mp"] = spawnstruct();
	level.weapons["enfield_scope_mp"].server_allowcvar = "scr_allow_enfieldsniper";
	level.weapons["enfield_scope_mp"].client_allowcvar = "ui_allow_enfieldsniper";
	level.weapons["enfield_scope_mp"].allow_default = 1;
	level.weapons["enfield_scope_mp"].classname = "sniper";
	level.weapons["enfield_scope_mp"].team = "allies";
	level.weapons["enfield_scope_mp"].limit = [[level.ex_drm]]("ex_enfield_scope_limit", 99, 0, 99, "int");
	level.weapons["enfield_scope_mp"].ammo_limit = [[level.ex_drm]]("ex_enfield_scope_ammo_limit", 60, 0, 999, "int");

	level.weapons["mosin_nagant_sniper_mp"] = spawnstruct();
	level.weapons["mosin_nagant_sniper_mp"].server_allowcvar = "scr_allow_nagantsniper";
	level.weapons["mosin_nagant_sniper_mp"].client_allowcvar = "ui_allow_nagantsniper";
	level.weapons["mosin_nagant_sniper_mp"].allow_default = 1;
	level.weapons["mosin_nagant_sniper_mp"].classname = "sniper";
	level.weapons["mosin_nagant_sniper_mp"].team = "allies";
	level.weapons["mosin_nagant_sniper_mp"].limit = [[level.ex_drm]]("ex_mosin_nagant_sniper_limit", 99, 0, 99, "int");
	level.weapons["mosin_nagant_sniper_mp"].ammo_limit = [[level.ex_drm]]("ex_mosin_nagant_sniper_ammo_limit", 60, 0, 999, "int");

	level.weapons["kar98k_sniper_mp"] = spawnstruct();
	level.weapons["kar98k_sniper_mp"].server_allowcvar = "scr_allow_kar98ksniper";
	level.weapons["kar98k_sniper_mp"].client_allowcvar = "ui_allow_kar98ksniper";
	level.weapons["kar98k_sniper_mp"].allow_default = 1;
	level.weapons["kar98k_sniper_mp"].classname = "sniper";
	level.weapons["kar98k_sniper_mp"].team = "axis";
	level.weapons["kar98k_sniper_mp"].limit = [[level.ex_drm]]("ex_kar98k_sniper_limit", 99, 0, 99, "int");
	level.weapons["kar98k_sniper_mp"].ammo_limit = [[level.ex_drm]]("ex_kar98k_sniper_ammo_limit", 60, 0, 999, "int");

	level.weapons["g43_sniper"] = spawnstruct();
	level.weapons["g43_sniper"].server_allowcvar = "scr_allow_g43sniper";
	level.weapons["g43_sniper"].client_allowcvar = "ui_allow_g43sniper";
	level.weapons["g43_sniper"].allow_default = 1;
	level.weapons["g43_sniper"].classname = "sniper";
	level.weapons["g43_sniper"].team = "axis";
	level.weapons["g43_sniper"].limit = [[level.ex_drm]]("ex_g43_sniper_limit", 99, 0, 99, "int");
	level.weapons["g43_sniper"].ammo_limit = [[level.ex_drm]]("ex_g43_sniper_ammo_limit", 100, 0, 999, "int");

	// rifles
	level.weapons["m1carbine_mp"] = spawnstruct();
	level.weapons["m1carbine_mp"].server_allowcvar = "scr_allow_m1carbine";
	level.weapons["m1carbine_mp"].client_allowcvar = "ui_allow_m1carbine";
	level.weapons["m1carbine_mp"].allow_default = 1;
	level.weapons["m1carbine_mp"].classname = "rifle";
	level.weapons["m1carbine_mp"].team = "allies";
	level.weapons["m1carbine_mp"].limit = [[level.ex_drm]]("ex_m1carbine_limit", 99, 0, 99, "int");
	level.weapons["m1carbine_mp"].ammo_limit = [[level.ex_drm]]("ex_m1carbine_ammo_limit", 90, 0, 999, "int");

	level.weapons["m1garand_mp"] = spawnstruct();
	level.weapons["m1garand_mp"].server_allowcvar = "scr_allow_m1garand";
	level.weapons["m1garand_mp"].client_allowcvar = "ui_allow_m1garand";
	level.weapons["m1garand_mp"].allow_default = 1;
	level.weapons["m1garand_mp"].classname = "rifle";
	level.weapons["m1garand_mp"].team = "allies";
	level.weapons["m1garand_mp"].limit = [[level.ex_drm]]("ex_m1garand_limit", 99, 0, 99, "int");
	level.weapons["m1garand_mp"].ammo_limit = [[level.ex_drm]]("ex_m1garand_ammo_limit", 96, 0, 999, "int");

	level.weapons["enfield_mp"] = spawnstruct();
	level.weapons["enfield_mp"].server_allowcvar = "scr_allow_enfield";
	level.weapons["enfield_mp"].client_allowcvar = "ui_allow_enfield";
	level.weapons["enfield_mp"].allow_default = 1;
	level.weapons["enfield_mp"].classname = "rifle";
	level.weapons["enfield_mp"].team = "allies";
	level.weapons["enfield_mp"].limit = [[level.ex_drm]]("ex_enfield_limit", 99, 0, 99, "int");
	level.weapons["enfield_mp"].ammo_limit = [[level.ex_drm]]("ex_enfield_ammo_limit", 60, 0, 999, "int");

	level.weapons["kar98k_mp"] = spawnstruct();
	level.weapons["kar98k_mp"].server_allowcvar = "scr_allow_kar98k";
	level.weapons["kar98k_mp"].client_allowcvar = "ui_allow_kar98k";
	level.weapons["kar98k_mp"].allow_default = 1;
	level.weapons["kar98k_mp"].classname = "rifle";
	level.weapons["kar98k_mp"].team = "axis";
	level.weapons["kar98k_mp"].limit = [[level.ex_drm]]("ex_kar98k_limit", 99, 0, 99, "int");
	level.weapons["kar98k_mp"].ammo_limit = [[level.ex_drm]]("ex_kar98k_ammo_limit", 60, 0, 999, "int");

	level.weapons["g43_mp"] = spawnstruct();
	level.weapons["g43_mp"].server_allowcvar = "scr_allow_g43";
	level.weapons["g43_mp"].client_allowcvar = "ui_allow_g43";
	level.weapons["g43_mp"].allow_default = 1;
	level.weapons["g43_mp"].classname = "rifle";
	level.weapons["g43_mp"].team = "axis";
	level.weapons["g43_mp"].limit = [[level.ex_drm]]("ex_g43_limit", 99, 0, 99, "int");
	level.weapons["g43_mp"].ammo_limit = [[level.ex_drm]]("ex_g43_ammo_limit", 100, 0, 999, "int");

	level.weapons["SVT40_mp"] = spawnstruct();
	level.weapons["SVT40_mp"].server_allowcvar = "scr_allow_svt40";
	level.weapons["SVT40_mp"].client_allowcvar = "ui_allow_svt40";
	level.weapons["SVT40_mp"].allow_default = 1;
	level.weapons["SVT40_mp"].classname = "rifle";
	level.weapons["SVT40_mp"].team = "allies";
	level.weapons["SVT40_mp"].limit = [[level.ex_drm]]("ex_SVT40_limit", 99, 0, 99, "int");
	level.weapons["SVT40_mp"].ammo_limit = [[level.ex_drm]]("ex_SVT40_ammo_limit", 100, 0, 999, "int");

	level.weapons["mosin_nagant_mp"] = spawnstruct();
	level.weapons["mosin_nagant_mp"].server_allowcvar = "scr_allow_nagant";
	level.weapons["mosin_nagant_mp"].client_allowcvar = "ui_allow_nagant";
	level.weapons["mosin_nagant_mp"].allow_default = 1;
	level.weapons["mosin_nagant_mp"].classname = "rifle";
	level.weapons["mosin_nagant_mp"].team = "allies";
	level.weapons["mosin_nagant_mp"].limit = [[level.ex_drm]]("ex_mosin_nagant_limit", 99, 0, 99, "int");
	level.weapons["mosin_nagant_mp"].ammo_limit = [[level.ex_drm]]("ex_mosin_nagant_ammo_limit", 60, 0, 999, "int");

	// machine guns
	level.weapons["bar_mp"] = spawnstruct();
	level.weapons["bar_mp"].server_allowcvar = "scr_allow_bar";
	level.weapons["bar_mp"].client_allowcvar = "ui_allow_bar";
	level.weapons["bar_mp"].allow_default = 1;
	level.weapons["bar_mp"].classname = "mg";
	level.weapons["bar_mp"].team = "allies";
	level.weapons["bar_mp"].limit = [[level.ex_drm]]("ex_bar_limit", 99, 0, 99, "int");
	level.weapons["bar_mp"].ammo_limit = [[level.ex_drm]]("ex_bar_ammo_limit", 120, 0, 999, "int");

	level.weapons["mobile_30cal"] = spawnstruct();
	level.weapons["mobile_30cal"].server_allowcvar = "scr_allow_mg30cal";
	level.weapons["mobile_30cal"].client_allowcvar = "ui_allow_mg30cal";
	level.weapons["mobile_30cal"].allow_default = 1;
	level.weapons["mobile_30cal"].classname = "mg";
	level.weapons["mobile_30cal"].team = "allies";
	level.weapons["mobile_30cal"].limit = [[level.ex_drm]]("ex_mg30cal_limit", 99, 0, 99, "int");
	level.weapons["mobile_30cal"].ammo_limit = [[level.ex_drm]]("ex_mg30cal_ammo_limit", 500, 0, 999, "int");

	level.weapons["mobile_mg42"] = spawnstruct();
	level.weapons["mobile_mg42"].server_allowcvar = "scr_allow_mg42";
	level.weapons["mobile_mg42"].client_allowcvar = "ui_allow_mg42";
	level.weapons["mobile_mg42"].allow_default = 1;
	level.weapons["mobile_mg42"].classname = "mg";
	level.weapons["mobile_mg42"].team = "axis";
	level.weapons["mobile_mg42"].limit = [[level.ex_drm]]("ex_mg42_limit", 99, 0, 99, "int");
	level.weapons["mobile_mg42"].ammo_limit = [[level.ex_drm]]("ex_mg42_ammo_limit", 500, 0, 999, "int");

	level.weapons["bren_mp"] = spawnstruct();
	level.weapons["bren_mp"].server_allowcvar = "scr_allow_bren";
	level.weapons["bren_mp"].client_allowcvar = "ui_allow_bren";
	level.weapons["bren_mp"].allow_default = 1;
	level.weapons["bren_mp"].classname = "mg";
	level.weapons["bren_mp"].team = "allies";
	level.weapons["bren_mp"].limit = [[level.ex_drm]]("ex_bren_limit", 99, 0, 99, "int");
	level.weapons["bren_mp"].ammo_limit = [[level.ex_drm]]("ex_bren_ammo_limit", 180, 0, 999, "int");

	level.weapons["ppsh_mp"] = spawnstruct();
	level.weapons["ppsh_mp"].server_allowcvar = "scr_allow_ppsh";
	level.weapons["ppsh_mp"].client_allowcvar = "ui_allow_ppsh";
	level.weapons["ppsh_mp"].allow_default = 1;
	level.weapons["ppsh_mp"].classname = "mg";
	level.weapons["ppsh_mp"].team = "allies";
	level.weapons["ppsh_mp"].limit = [[level.ex_drm]]("ex_ppsh_limit", 99, 0, 99, "int");
	level.weapons["ppsh_mp"].ammo_limit = [[level.ex_drm]]("ex_ppsh_ammo_limit", 213, 0, 999, "int");

	level.weapons["mp44_mp"] = spawnstruct();
	level.weapons["mp44_mp"].server_allowcvar = "scr_allow_mp44";
	level.weapons["mp44_mp"].client_allowcvar = "ui_allow_mp44";
	level.weapons["mp44_mp"].allow_default = 1;
	level.weapons["mp44_mp"].classname = "mg";
	level.weapons["mp44_mp"].team = "axis";
	level.weapons["mp44_mp"].limit = [[level.ex_drm]]("ex_mp44_limit", 99, 0, 99, "int");
	level.weapons["mp44_mp"].ammo_limit = [[level.ex_drm]]("ex_mp44_ammo_limit", 180, 0, 999, "int");

	// submachine guns
	level.weapons["greasegun_mp"] = spawnstruct();
	level.weapons["greasegun_mp"].server_allowcvar = "scr_allow_greasegun";
	level.weapons["greasegun_mp"].client_allowcvar = "ui_allow_greasegun";
	level.weapons["greasegun_mp"].allow_default = 1;
	level.weapons["greasegun_mp"].classname = "smg";
	level.weapons["greasegun_mp"].team = "allies";
	level.weapons["greasegun_mp"].limit = [[level.ex_drm]]("ex_greasegun_limit", 99, 0, 99, "int");
	level.weapons["greasegun_mp"].ammo_limit = [[level.ex_drm]]("ex_greasegun_ammo_limit", 192, 0, 999, "int");

	level.weapons["thompson_mp"] = spawnstruct();
	level.weapons["thompson_mp"].server_allowcvar = "scr_allow_thompson";
	level.weapons["thompson_mp"].client_allowcvar = "ui_allow_thompson";
	level.weapons["thompson_mp"].allow_default = 1;
	level.weapons["thompson_mp"].classname = "smg";
	level.weapons["thompson_mp"].team = "allies";
	level.weapons["thompson_mp"].limit = [[level.ex_drm]]("ex_thompson_limit", 99, 0, 99, "int");
	level.weapons["thompson_mp"].ammo_limit = [[level.ex_drm]]("ex_thompson_ammo_limit", 180, 0, 999, "int");

	level.weapons["sten_mp"] = spawnstruct();
	level.weapons["sten_mp"].server_allowcvar = "scr_allow_sten";
	level.weapons["sten_mp"].client_allowcvar = "ui_allow_sten";
	level.weapons["sten_mp"].allow_default = 1;
	level.weapons["sten_mp"].classname = "smg";
	level.weapons["sten_mp"].team = "allies";
	level.weapons["sten_mp"].limit = [[level.ex_drm]]("ex_sten_limit", 99, 0, 99, "int");
	level.weapons["sten_mp"].ammo_limit = [[level.ex_drm]]("ex_sten_ammo_limit", 192, 0, 999, "int");

	level.weapons["PPS42_mp"] = spawnstruct();
	level.weapons["PPS42_mp"].server_allowcvar = "scr_allow_pps42";
	level.weapons["PPS42_mp"].client_allowcvar = "ui_allow_pps42";
	level.weapons["PPS42_mp"].allow_default = 1;
	level.weapons["PPS42_mp"].classname = "smg";
	level.weapons["PPS42_mp"].team = "allies";
	level.weapons["PPS42_mp"].limit = [[level.ex_drm]]("ex_PPS42_limit", 99, 0, 99, "int");
	level.weapons["PPS42_mp"].ammo_limit = [[level.ex_drm]]("ex_PPS42_ammo_limit", 210, 0, 999, "int");

	level.weapons["mp40_mp"] = spawnstruct();
	level.weapons["mp40_mp"].server_allowcvar = "scr_allow_mp40";
	level.weapons["mp40_mp"].client_allowcvar = "ui_allow_mp40";
	level.weapons["mp40_mp"].allow_default = 1;
	level.weapons["mp40_mp"].classname = "smg";
	level.weapons["mp40_mp"].team = "axis";
	level.weapons["mp40_mp"].limit = [[level.ex_drm]]("ex_mp40_limit", 99, 0, 99, "int");
	level.weapons["mp40_mp"].ammo_limit = [[level.ex_drm]]("ex_mp40_ammo_limit", 192, 0, 999, "int");

	// shotgun
	level.weapons["shotgun_mp"] = spawnstruct();
	level.weapons["shotgun_mp"].server_allowcvar = "scr_allow_shotgun";
	level.weapons["shotgun_mp"].client_allowcvar = "ui_allow_shotgun";
	level.weapons["shotgun_mp"].allow_default = 1;
	level.weapons["shotgun_mp"].classname = "shotgun";
	level.weapons["shotgun_mp"].team = "all";
	level.weapons["shotgun_mp"].limit = [[level.ex_drm]]("ex_shotgun_limit", 99, 0, 99, "int");
	level.weapons["shotgun_mp"].ammo_limit = [[level.ex_drm]]("ex_shotgun_ammo_limit", 60, 0, 999, "int");

	// panzerschreck
	level.weapons["panzerschreck_mp"] = spawnstruct();
	level.weapons["panzerschreck_mp"].server_allowcvar = "scr_allow_panzerschreck";
	level.weapons["panzerschreck_mp"].client_allowcvar = "ui_allow_panzerschreck";
	level.weapons["panzerschreck_mp"].allow_default = 1;
	level.weapons["panzerschreck_mp"].classname = "rl";
	level.weapons["panzerschreck_mp"].team = "axis";
	level.weapons["panzerschreck_mp"].limit = [[level.ex_drm]]("ex_panzer_limit", 99, 0, 99, "int");
	level.weapons["panzerschreck_mp"].ammo_limit = [[level.ex_drm]]("ex_panzer_ammo_limit", 4, 0, 999, "int");

	// panzerschreck
	level.weapons["panzerschreck_allies"] = spawnstruct();
	level.weapons["panzerschreck_allies"].server_allowcvar = "scr_allow_bazooka";
	level.weapons["panzerschreck_allies"].client_allowcvar = "ui_allow_bazooka";
	level.weapons["panzerschreck_allies"].allow_default = 1;
	level.weapons["panzerschreck_allies"].classname = "rl";
	level.weapons["panzerschreck_allies"].team = "allies";
	level.weapons["panzerschreck_allies"].limit = [[level.ex_drm]]("ex_bazooka_limit", 99, 0, 99, "int");
	level.weapons["panzerschreck_allies"].ammo_limit = [[level.ex_drm]]("ex_bazooka_ammo_limit", 4, 0, 999, "int");

	// frag grenades
	level.weapons["fraggrenade"] = spawnstruct();
	level.weapons["fraggrenade"].server_allowcvar = "scr_allow_fraggrenades";
	level.weapons["fraggrenade"].client_allowcvar = "ui_allow_fraggrenades";
	level.weapons["fraggrenade"].allow_default = 1;
	level.weapons["fraggrenade"].classname = "nade";
	level.weapons["fraggrenade"].team = "all";
	level.weapons["fraggrenade"].limit = [[level.ex_drm]]("ex_fraggrenade_limit", 999, 0, 999, "int");
	level.weapons["fraggrenade"].ammo_limit = [[level.ex_drm]]("ex_fraggrenade_ammo_limit", 1, 0, 9, "int");

	// smoke grenades
	level.weapons["smokegrenade"] = spawnstruct();
	level.weapons["smokegrenade"].server_allowcvar = "scr_allow_smokegrenades";
	level.weapons["smokegrenade"].client_allowcvar = "ui_allow_smokegrenades";
	level.weapons["smokegrenade"].allow_default = 1;
	level.weapons["smokegrenade"].classname = "smoke";
	level.weapons["smokegrenade"].team = "all";
	level.weapons["smokegrenade"].limit = [[level.ex_drm]]("ex_smokegrenade_limit", 999, 0, 999, "int");
	level.weapons["smokegrenade"].ammo_limit = [[level.ex_drm]]("ex_smokegrenade_ammo_limit", 1, 0, 9, "int");

	// pistols
	level.weapons["colt_mp"] = spawnstruct();
	level.weapons["colt_mp"].server_allowcvar = "scr_allow_colt";
	level.weapons["colt_mp"].client_allowcvar = "ui_allow_colt";
	level.weapons["colt_mp"].allow_default = 1;
	level.weapons["colt_mp"].classname = "pistol";
	level.weapons["colt_mp"].team = "allies";
	level.weapons["colt_mp"].limit = [[level.ex_drm]]("ex_colt_limit", 99, 0, 99, "int");
	level.weapons["colt_mp"].ammo_limit = [[level.ex_drm]]("ex_colt_ammo_limit", 21, 0, 999, "int");

	level.weapons["webley_mp"] = spawnstruct();
	level.weapons["webley_mp"].server_allowcvar = "scr_allow_webley";
	level.weapons["webley_mp"].client_allowcvar = "ui_allow_webley";
	level.weapons["webley_mp"].allow_default = 1;
	level.weapons["webley_mp"].classname = "pistol";
	level.weapons["webley_mp"].team = "allies";
	level.weapons["webley_mp"].limit = [[level.ex_drm]]("ex_webley_limit", 99, 0, 99, "int");
	level.weapons["webley_mp"].ammo_limit = [[level.ex_drm]]("ex_webley_ammo_limit", 18, 0, 999, "int");

	level.weapons["TT30_mp"] = spawnstruct();
	level.weapons["TT30_mp"].server_allowcvar = "scr_allow_tt30";
	level.weapons["TT30_mp"].client_allowcvar = "ui_allow_tt30";
	level.weapons["TT30_mp"].allow_default = 1;
	level.weapons["TT30_mp"].classname = "pistol";
	level.weapons["TT30_mp"].team = "allies";
	level.weapons["TT30_mp"].limit = [[level.ex_drm]]("ex_TT30_limit", 99, 0, 99, "int");
	level.weapons["TT30_mp"].ammo_limit = [[level.ex_drm]]("ex_TT30_ammo_limit", 24, 0, 999, "int");

	level.weapons["luger_mp"] = spawnstruct();
	level.weapons["luger_mp"].server_allowcvar = "scr_allow_luger";
	level.weapons["luger_mp"].client_allowcvar = "ui_allow_luger";
	level.weapons["luger_mp"].allow_default = 1;
	level.weapons["luger_mp"].classname = "pistol";
	level.weapons["luger_mp"].team = "axis";
	level.weapons["luger_mp"].limit = [[level.ex_drm]]("ex_luger_limit", 99, 0, 99, "int");
	level.weapons["luger_mp"].ammo_limit = [[level.ex_drm]]("ex_luger_ammo_limit", 24, 0, 999, "int");

	// binoculars
	level.weapons["binoculars_mp"] = spawnstruct();
	level.weapons["binoculars_mp"].server_allowcvar = "scr_allow_binocular";
	level.weapons["binoculars_mp"].client_allowcvar = "ui_allow_binocular";
	level.weapons["binoculars_mp"].allow_default = 1;
	level.weapons["binoculars_mp"].classname = "binocular";
	level.weapons["binoculars_mp"].team = "all";
	level.weapons["binoculars_mp"].limit = [[level.ex_drm]]("ex_wmd_binocular_limit", 99, 0, 99, "int");
	level.weapons["binoculars_mp"].ammo_limit = 999;

	level.weapons["knife_mp"] = spawnstruct();
	level.weapons["knife_mp"].server_allowcvar = "scr_allow_knife";
	level.weapons["knife_mp"].client_allowcvar = "ui_allow_knife";
	level.weapons["knife_mp"].allow_default = 1;
	level.weapons["knife_mp"].team = "all";
	level.weapons["knife_mp"].classname = "pistol";
	level.weapons["knife_mp"].limit = [[level.ex_drm]]("ex_knife_limit", 99, 0, 99, "int");
	level.weapons["knife_mp"].ammo_limit = [[level.ex_drm]]("ex_knife_ammo_limit", 30, 0, 999, "int");
}

precacheWeapons()
{
	classname = undefined;
	allweapons = false;

	switch(level.ex_wepo_class)
	{
		case 1:	classname = "pistol";		break;	// pistol only
		case 2:	classname = "sniper";		break;	// sniper only
		case 3:	classname = "mg";			break;	// mg only
		case 4:	classname = "smg";			break;	// smg only
		case 5:	classname = "rifle";			break;	// rifle only
		case 6: classname = "boltrifle";	break;	// bolt action rifle only
		case 7: classname = "shotgun";	break;	// shotgun only
		case 8: classname = "rl";	break;	// panzerschreck only
		default:	allweapons = true;			break;	// all weapons
	}

	// precache the on hand weapons
	for(i = 0; i < level.weapons.size; i++)
	{
		weaponname = level.weaponnames[i];
		
		if(weaponname != "fraggrenade" && weaponname != "smokegrenade")
		{
			if(allweapons)	// all weapons for game allies and game axis
			{
				 if(level.ex_wepo_secondary && level.ex_wepo_sec_pistols || !level.ex_wepo_class) // if using secondary system with pistols or all weapons available (team)
				 {
				 	if(isWeaponType(weaponname, game["allies"]) || isWeaponType(weaponname, game["axis"]))
						[[level.ex_PrecacheItem]](weaponname);
				}
				else if(level.ex_wepo_secondary && !level.ex_wepo_sec_pistols) // if using secondary system without pistols
				{
				 	if(!isWeaponType(weaponname, "pistol") && (isWeaponType(weaponname, game["allies"]) || isWeaponType(weaponname, game["axis"])))
						[[level.ex_PrecacheItem]](weaponname);
				}
			}
			else // must be weapon based (secondary system disabled)
			{
				if(level.ex_wepo_team_only) // team based, only precache weapons of this type that match the game allies and the game axis
				{
					if(isWeaponType(weaponname, classname) && (isWeaponType(weaponname, game["allies"]) || isWeaponType(weaponname, game["axis"])))
						[[level.ex_PrecacheItem]](weaponname);
				}
				else // not team based so precache all weapons of this type
				{
					if(isWeaponType(weaponname, classname))
						[[level.ex_PrecacheItem]](weaponname);
				}
	
				if(level.ex_wepo_sidearm && isWeaponType(weaponname, "pistol")) // if sidearm (pistol) is allowed precache it
				{
					if(level.ex_wepo_team_only) // only precache pistols that match the game allies and the game axis
					{
						if((isWeaponType(weaponname, game["allies"]) || isWeaponType(weaponname, game["axis"])))
							[[level.ex_PrecacheItem]](weaponname);
					}
					else [[level.ex_PrecacheItem]](weaponname); // precache all pistols (non team based)
				}
			}
		}
	}

	// preacache the frag grenades (off hand)
	[[level.ex_PrecacheItem]]("frag_grenade_" + game["allies"] + "_mp");
	[[level.ex_PrecacheItem]]("frag_grenade_german_mp");

	// precache the smoke grenades (off hand)
	[[level.ex_PrecacheItem]]("smoke_grenade_" + game["allies"] + getSmokeColour(level.ex_smoke[game["allies"]]) + "mp");
	[[level.ex_PrecacheItem]]("smoke_grenade_german" + GetSmokeColour(level.ex_smoke["german"]) + "mp");

	// tripwire placebo weapon
	if(level.ex_tweapon) [[level.ex_PrecacheItem]]("tripwire_mp");

	// sprint system placebo weapon
	if(level.ex_sprint) [[level.ex_PrecacheItem]]("sprint_mp");

	// artillery placebo weapon
	if(level.ex_ranksystem) [[level.ex_PrecacheItem]]("artillery_mp");

	// mortar placebo weapon
	if(level.ex_ranksystem || level.ex_mortars) [[level.ex_PrecacheItem]]("mortar_mp");

	// landmine placebo weapon
	if(level.ex_landmines) [[level.ex_PrecacheItem]]("landmine_mp");

	// plane & plane bomb placebo weapons
	if(level.ex_ranksystem || level.ex_planes)
	{
		[[level.ex_PrecacheItem]]("plane_mp");
		[[level.ex_PrecacheItem]]("planebomb_mp");
	}

	// dummy weapons, placebo's for empty slots
	[[level.ex_PrecacheItem]]("dummy1_mp");
	[[level.ex_PrecacheItem]]("dummy2_mp");
	[[level.ex_PrecacheItem]]("dummy3_mp");
	[[level.ex_PrecacheItem]]("dummy4_mp");

	// you look through these :)
	[[level.ex_PrecacheItem]]("binoculars_mp");

	// knives
	[[level.ex_PrecacheItem]]("knife_mp");

	// unfix turrets
	if(level.ex_turrets == 2)
	{	
		[[level.ex_PrecacheItem]]("30cal_stand_mp");
		[[level.ex_PrecacheItem]]("30cal_prone_mp");
		[[level.ex_PrecacheItem]]("mg42_bipod_duck_mp");
		[[level.ex_PrecacheItem]]("mg42_bipod_prone_mp");
		[[level.ex_PrecacheItem]]("mg42_bipod_stand_mp");
	}
}
