Starting loadout based on class/side selected by the player
Hello ! i am trying to set a specific start gear based on the current selected side combined with the class selected by  the players.

My idea is to be able to set loadouts, depending on Side / Rol, for example.

a Blufor Medic, pilot or sniper, with diferent loadlout than opfor or independents medics / snipers, etc.

 and i found this:

On playerSetupGear.sqf

Code: [Select]
switch (true) do
{
case (["_medic_", typeOf _player] call fn_findString != -1):
{
removeAllWeapons _player;
//Rifle
_player addMagazine "30Rnd_65x39_caseless_green";
_player addWeapon "arifle_Katiba_F";
_player addItemToBackpack "30Rnd_65x39_caseless_green";
_player addItemToBackpack "30Rnd_65x39_caseless_green";
_player addItemToBackpack "30Rnd_65x39_caseless_green";
_player addPrimaryWeaponItem "optic_Hamr";
//Handgun
_player addMagazine "11Rnd_45ACP_Mag";
_player addWeapon "hgun_Pistol_heavy_01_F";
_player addItemToVest "11Rnd_45ACP_Mag";
//Items
_player addItem "Medikit";
_player addWeapon "Binocular";
_player addItem "SmokeShell";
_player addItem "HandGrenade";
};
case (["_engineer_", typeOf _player] call fn_findString != -1):
{
removeAllWeapons _player;
//Rifle
_player addMagazine "30Rnd_556x45_Stanag_Tracer_Red";
_player addWeapon "arifle_TRG20_F";
_player addPrimaryWeaponItem "optic_Aco_grn";
_player addItemToBackpack "30Rnd_556x45_Stanag_Tracer_Red";
_player addItemToBackpack "30Rnd_556x45_Stanag_Tracer_Red";
_player addItemToBackpack "30Rnd_556x45_Stanag_Tracer_Red";
//Handgun
_player addMagazine "11Rnd_45ACP_Mag";
_player addWeapon "hgun_Pistol_heavy_01_F";
_player addItemToVest "11Rnd_45ACP_Mag";
//Launch
_player addMagazine "RPG7_F";
_player addWeapon "launch_RPG7_F";
_player addItemToBackpack "RPG7_F";
_player addItemToBackpack "RPG7_F";
//Items
_player addItem "FirstAidKit";
_player addItem "Toolkit";
_player addWeapon "Binocular";
_player addItem "SmokeShell";
_player addItem "HandGrenade";
};
case (["_sniper_", typeOf _player] call fn_findString != -1):
{
removeAllWeapons _player;
//Rifle
_player addMagazine "20Rnd_762x51_Mag";
_player addWeapon "srifle_EBR_F";
_player addPrimaryWeaponItem "optic_AMS";
_player addItemToBackpack "20Rnd_762x51_Mag";
_player addItemToBackpack "20Rnd_762x51_Mag";
_player addItemToBackpack "20Rnd_762x51_Mag";
//Handgun
_player addMagazine "11Rnd_45ACP_Mag";
_player addWeapon "hgun_Pistol_heavy_01_F";
_player addItemToVest "11Rnd_45ACP_Mag";
//Items
_player addItem "FirstAidKit";
_player addWeapon "Rangefinder";
_player addItem "SmokeShell";
_player addItem "HandGrenade";
};
case (["_diver_", typeOf _player] call fn_findString != -1):
{
removeAllWeapons _player;
//Rifle
_player addMagazine "20Rnd_556x45_UW_mag";
_player addWeapon "arifle_SDAR_F";
_player addItemToBackpack "20Rnd_556x45_UW_mag";
_player addItemToBackpack "20Rnd_556x45_UW_mag";
_player addItemToBackpack "20Rnd_556x45_UW_mag";
//Handgun
_player addMagazine "11Rnd_45ACP_Mag";
_player addWeapon "hgun_Pistol_heavy_01_F";
_player addItemToVest "11Rnd_45ACP_Mag";
//Items
_player addItem "FirstAidKit";
_player addWeapon "Binocular";
_player addItem "SmokeShell";
_player addItem "HandGrenade";
_player addItem "NVGoggles";
};

};

This is only selecting by Class, any help to add the rests combinations ?

Thanks and srry for my horrible english !!