//	@file Version: 1.0
//	@file Name: ADP_F_getWeapon.sqf
//	@file Author: THumbert
//	@file Created: 12/14/2013
//	@file Description: Spawns selected Weapon

_listbox = _this select 0;
_weapon = _this select 1;
_type = _this select 2;
_ammo = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
_ammotype = _ammo select 0;
switch (_type) do  
{
	case 0: {removeAllWeapons player;[player, _weapon, 8] call BIS_fnc_addWeapon;};
	case 1: {removeAllWeapons player;[player, _weapon, 5] call BIS_fnc_addWeapon;};
	case 2: {removeBackPack player;player addBackPack "B_AssaultPack_blk";[player, _weapon, 2, _ammotype] call BIS_fnc_addWeapon;};
	case 3: {player addMagazine _weapon; hint "Grenade Added";};
};
