I think the problem is that _magazine, _weapon, etc... are defined only inside the switch statement so they wouldn't have values outside of the switch statement. Try this:
private ["_unit","_kits","_kitCount","_kit","_magCount"];
_unit = _this select 0;
_kits =
[
["RH_deagle", "7Rnd_50_AE", "HandGrenade_West"],
["RH_mk22", "8Rnd_9x19_Mk", ""],
["RH_mk22sd", "8Rnd_9x19_Mksd", ""],
["RH_usp", "15Rnd_9x19_usp", ""],
["RH_uspm", "12Rnd_45cal_usp", ""],
["RH_m1911", "8Rnd_45cal_m1911", ""],
["RH_m1911sd", "8Rnd_45cal_m1911", ""],
["RH_m1911old", "8Rnd_45cal_m1911", ""],
["RH_m9", "15Rnd_9x19_M9", ""],
["RH_g17", "17Rnd_9x19_g17", ""],
["RH_g18", "19Rnd_9x19_g18", ""],
["RH_tt33", "8Rnd_762_tt33", ""],
["RH_vz61", "20Rnd_32cal_vz61", ""],
["RH_tec9", "30Rnd_9x19_tec", ""],
["RH_muzi", "32Rnd_9x19_Muzi", ""]
];
_kitCount = count _kits;
_kit = _kits select (round(random(_kitCount - 1)));
_magCount = (round (random 5)) + 3;
removeAllWeapons _unit;
_unit addWeapon (_kit select 0);
for "_i" from 1 to _magCount do
{
_unit addMagazine (_kit select 1);
};
if ((_kit select 2) != "") then
{
_unit addMagazine (_kit select 2);
};