Announcement

Collapse
No announcement yet.

Custom Loadout Script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom Loadout Script

    After making my custom kits in the Arsenal from the games main menu...I tweak the code for each of them to fit into the following script.

    Each player is named in the editor and my naming convention is pretty straightforward. ATL = Alpha Team Leader, AAR = Alpha Automatic Rifleman.

    In the top of the script you assign a "_kit" to each of the player unit names you create in the editor and voila...you are done.

    In the initLocalClient.sqf add the following line:
    Code:
    _customKit = []execVM "loadout.sqf";
    loadout.sqf
    Code:
    _kit = player;
    if (player == sl) then {_kit = "sl";};
    if (player == med) then {_kit = "medic";};
    _teamLeaders = [atl,btl,ctl];
    _grenadiers  = [agl,bgl,cgl];
    _autoRiflemen = [aar,bar,car];
    _assistantAutoRiflemen = [aaar,baar,caar];
    if (player in _teamLeaders) then {_kit = "tl";};
    if (player in _grenadiers) then {_kit = "gl";};
    if (player in _autoRiflemen) then {_kit = "ar";};
    if (player in _assistantAutoRiflemen) then {_kit = "aar";};
    
    //player sidechat format ["loadout.sqf has been switched on _kit = %1", _kit];
    
    switch (_kit) do
    {
    	case "sl":
    	{
    		comment "Exported from Arsenal by |TG-189th| Unkl";
    		
    		comment "Remove existing items";
    		removeAllWeapons player;
    		removeAllItems player;
    		removeAllAssignedItems player;
    		removeUniform player;
    		removeVest player;
    		removeBackpack player;
    		removeHeadgear player;
    		removeGoggles player;
    		
    		comment "Add containers";
    		player forceAddUniform "U_B_CTRG_2";
    		player addItemToUniform "FirstAidKit";
    		for "_i" from 1 to 2 do {player addItemToUniform "30Rnd_65x39_caseless_mag";};
    		player addVest "V_PlateCarrierL_CTRG";
    		for "_i" from 1 to 2 do {player addItemToVest "16Rnd_9x21_Mag";};
    		for "_i" from 1 to 2 do {player addItemToVest "HandGrenade";};
    		for "_i" from 1 to 3 do {player addItemToVest "APERSMine_Range_Mag";};
    		player addItemToVest "SmokeShell";
    		player addItemToVest "SmokeShellGreen";
    		for "_i" from 1 to 2 do {player addItemToVest "Chemlight_green";};
    		player addItemToVest "30Rnd_65x39_caseless_mag_Tracer";
    		player addItemToVest "30Rnd_65x39_caseless_mag";
    		player addBackpack "B_AssaultPack_mcamo";
    		player addItemToBackpack "FirstAidKit";
    		for "_i" from 1 to 7 do {player addItemToBackpack "30Rnd_65x39_caseless_mag";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "SmokeShell";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "SmokeShellRed";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "SmokeShellGreen";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "SmokeShellOrange";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "SmokeShellBlue";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "SmokeShellPurple";};
    		player addItemToBackpack "B_IR_Grenade";
    		for "_i" from 1 to 2 do {player addItemToBackpack "30Rnd_65x39_caseless_mag_Tracer";};
    		player addHeadgear "H_HelmetB";
    		
    		comment "Add weapons";
    		player addWeapon "arifle_MX_F";
    		player addPrimaryWeaponItem "muzzle_snds_H";
    		player addPrimaryWeaponItem "acc_pointer_IR";
    		player addPrimaryWeaponItem "optic_Hamr";
    		player addPrimaryWeaponItem "bipod_01_F_mtp";
    		player addWeapon "hgun_P07_F";
    		player addWeapon "Rangefinder";
    		
    		comment "Add items";
    		player linkItem "ItemMap";
    		player linkItem "ItemCompass";
    		player linkItem "ItemWatch";
    		player linkItem "ItemRadio";
    		player linkItem "ItemGPS";
    		player linkItem "NVGoggles";	
    	};
    	
    	case "medic":
    	{
    		comment "Exported from Arsenal by |TG-189th| Unkl";
    
    		comment "Remove existing items";
    		removeAllWeapons player;
    		removeAllItems player;
    		removeAllAssignedItems player;
    		removeUniform player;
    		removeVest player;
    		removeBackpack player;
    		removeHeadgear player;
    		removeGoggles player;
    		
    		comment "Add containers";
    		player forceAddUniform "U_B_CombatUniform_mcam_vest";
    		for "_i" from 1 to 2 do {player addItemToUniform "30Rnd_65x39_caseless_mag";};
    		player addItemToUniform "16Rnd_9x21_Mag";
    		for "_i" from 1 to 3 do {player addItemToUniform "SmokeShell";};
    		player addVest "V_TacVest_camo";
    		for "_i" from 1 to 6 do {player addItemToVest "30Rnd_65x39_caseless_mag";};
    		for "_i" from 1 to 9 do {player addItemToVest "SmokeShell";};
    		player addBackpack "B_Carryall_mcamo";
    		player addItemToBackpack "Medikit";
    		for "_i" from 1 to 18 do {player addItemToBackpack "FirstAidKit";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "30Rnd_65x39_caseless_mag";};
    		player addHeadgear "H_Booniehat_mcamo";
    		
    		comment "Add weapons";
    		player addWeapon "arifle_MX_ACO_pointer_snds_F";
    		player addPrimaryWeaponItem "muzzle_snds_H";
    		player addPrimaryWeaponItem "acc_pointer_IR";
    		player addPrimaryWeaponItem "optic_Aco";
    		player addWeapon "hgun_P07_snds_F";
    		player addHandgunItem "muzzle_snds_L";
    		player addWeapon "Binocular";
    		
    		comment "Add items";
    		player linkItem "ItemMap";
    		player linkItem "ItemCompass";
    		player linkItem "ItemWatch";
    		player linkItem "ItemRadio";
    		player linkItem "ItemGPS";
    		player linkItem "NVGoggles";
    	};
    	
    	case "tl":
    	{
    		comment "Exported from Arsenal by |TG-189th| Unkl";
    
    		comment "Remove existing items";
    		removeAllWeapons player;
    		removeAllItems player;
    		removeAllAssignedItems player;
    		removeUniform player;
    		removeVest player;
    		removeBackpack player;
    		removeHeadgear player;
    		removeGoggles player;
    		
    		comment "Add containers";
    		player forceAddUniform "U_B_CombatUniform_mcam_vest";
    		player addItemToUniform "FirstAidKit";
    		for "_i" from 1 to 3 do {player addItemToUniform "30Rnd_65x39_caseless_mag";};
    		player addVest "V_Chestrig_rgr";
    		for "_i" from 1 to 5 do {player addItemToVest "30Rnd_65x39_caseless_mag";};
    		for "_i" from 1 to 3 do {player addItemToVest "16Rnd_9x21_Mag";};
    		for "_i" from 1 to 2 do {player addItemToVest "MiniGrenade";};
    		player addItemToVest "SmokeShellGreen";
    		for "_i" from 1 to 2 do {player addItemToVest "Chemlight_green";};
    		for "_i" from 1 to 2 do {player addItemToVest "SmokeShell";};
    		for "_i" from 1 to 2 do {player addItemToVest "SmokeShellRed";};
    		player addBackpack "B_AssaultPack_mcamo";
    		player addItemToBackpack "FirstAidKit";
    		for "_i" from 1 to 4 do {player addItemToBackpack "30Rnd_65x39_caseless_mag_Tracer";};
    		for "_i" from 1 to 5 do {player addItemToBackpack "30Rnd_65x39_caseless_mag";};
    		player addHeadgear "H_HelmetB";
    		
    		comment "Add weapons";
    		player addWeapon "arifle_MX_ACO_pointer_snds_F";
    		player addPrimaryWeaponItem "muzzle_snds_H";
    		player addPrimaryWeaponItem "acc_pointer_IR";
    		player addPrimaryWeaponItem "optic_Hamr";
    		player addWeapon "hgun_P07_snds_F";
    		player addHandgunItem "muzzle_snds_L";
    		player addWeapon "Binocular";
    		
    		comment "Add items";
    		player linkItem "ItemMap";
    		player linkItem "ItemCompass";
    		player linkItem "ItemWatch";
    		player linkItem "ItemRadio";
    		player linkItem "ItemGPS";
    		player linkItem "NVGoggles";
    	};
    	
    	case "gl":
    	{
    		comment "Exported from Arsenal by |TG-189th| Unkl";
    
    		comment "Remove existing items";
    		removeAllWeapons player;
    		removeAllItems player;
    		removeAllAssignedItems player;
    		removeUniform player;
    		removeVest player;
    		removeBackpack player;
    		removeHeadgear player;
    		removeGoggles player;
    		
    		comment "Add containers";
    		player forceAddUniform "U_B_CombatUniform_mcam_vest";
    		player addItemToUniform "FirstAidKit";
    		for "_i" from 1 to 3 do {player addItemToUniform "30Rnd_65x39_caseless_mag";};
    		player addVest "V_Chestrig_rgr";
    		for "_i" from 1 to 3 do {player addItemToVest "16Rnd_9x21_Mag";};
    		for "_i" from 1 to 2 do {player addItemToVest "MiniGrenade";};
    		for "_i" from 1 to 2 do {player addItemToVest "Chemlight_green";};
    		for "_i" from 1 to 2 do {player addItemToVest "SmokeShell";};
    		for "_i" from 1 to 6 do {player addItemToVest "30Rnd_65x39_caseless_mag";};
    		for "_i" from 1 to 3 do {player addItemToVest "3Rnd_HE_Grenade_shell";};
    		player addBackpack "B_AssaultPack_mcamo";
    		for "_i" from 1 to 4 do {player addItemToBackpack "3Rnd_HE_Grenade_shell";};
    		for "_i" from 1 to 2 do {player addItemToBackpack "3Rnd_Smoke_Grenade_shell";};
    		player addItemToBackpack "3Rnd_SmokeGreen_Grenade_shell";
    		for "_i" from 1 to 3 do {player addItemToBackpack "3Rnd_UGL_FlareWhite_F";};
    		for "_i" from 1 to 5 do {player addItemToBackpack "30Rnd_65x39_caseless_mag";};
    		player addHeadgear "H_HelmetB_grass";
    		
    		comment "Add weapons";
    		player addWeapon "arifle_MX_GL_F";
    		player addPrimaryWeaponItem "muzzle_snds_H";
    		player addPrimaryWeaponItem "acc_pointer_IR";
    		player addPrimaryWeaponItem "optic_Hamr";
    		player addWeapon "hgun_P07_snds_F";
    		player addHandgunItem "muzzle_snds_L";
    		player addWeapon "Binocular";
    		
    		comment "Add items";
    		player linkItem "ItemMap";
    		player linkItem "ItemCompass";
    		player linkItem "ItemWatch";
    		player linkItem "ItemRadio";
    		player linkItem "ItemGPS";
    		player linkItem "NVGoggles";
    	};
    	
    	case "aar":
    	{
    		comment "Exported from Arsenal by |TG-189th| Unkl";
    
    		comment "Remove existing items";
    		removeAllWeapons player;
    		removeAllItems player;
    		removeAllAssignedItems player;
    		removeUniform player;
    		removeVest player;
    		removeBackpack player;
    		removeHeadgear player;
    		removeGoggles player;
    		
    		comment "Add containers";
    		player forceAddUniform "U_B_CombatUniform_mcam_vest";
    		player addItemToUniform "FirstAidKit";
    		for "_i" from 1 to 3 do {player addItemToUniform "30Rnd_65x39_caseless_mag";};
    		player addVest "V_Chestrig_rgr";
    		for "_i" from 1 to 9 do {player addItemToVest "30Rnd_65x39_caseless_mag";};
    		for "_i" from 1 to 2 do {player addItemToVest "SmokeShell";};
    		for "_i" from 1 to 2 do {player addItemToVest "MiniGrenade";};
    		for "_i" from 1 to 2 do {player addItemToVest "30Rnd_65x39_caseless_mag_Tracer";};
    		player addBackpack "B_AssaultPack_mcamo";
    		for "_i" from 1 to 4 do {player addItemToBackpack "100Rnd_65x39_caseless_mag";};
    		player addItemToBackpack "NLAW_F";
    		player addHeadgear "H_HelmetB_grass";
    		
    		comment "Add weapons";
    		player addWeapon "arifle_MX_F";
    		player addPrimaryWeaponItem "muzzle_snds_H";
    		player addPrimaryWeaponItem "acc_pointer_IR";
    		player addPrimaryWeaponItem "optic_Hamr";
    		player addMagazine "NLAW_F";
    		player addWeapon "launch_NLAW_F";
    		player addWeapon "hgun_P07_snds_F";
    		player addHandgunItem "muzzle_snds_L";
    		player addWeapon "Binocular";
    		
    		comment "Add items";
    		player linkItem "ItemMap";
    		player linkItem "ItemCompass";
    		player linkItem "ItemWatch";
    		player linkItem "ItemRadio";
    		player linkItem "ItemGPS";
    		player linkItem "NVGoggles";
    	};
    	
    	case "ar":
    	{
    		comment "Exported from Arsenal by |TG-189th| Unkl";
    
    		comment "Remove existing items";
    		removeAllWeapons player;
    		removeAllItems player;
    		removeAllAssignedItems player;
    		removeUniform player;
    		removeVest player;
    		removeBackpack player;
    		removeHeadgear player;
    		removeGoggles player;
    		
    		comment "Add containers";
    		player forceAddUniform "U_B_CombatUniform_mcam_vest";
    		player addItemToUniform "FirstAidKit";
    		player addItemToUniform "100Rnd_65x39_caseless_mag_Tracer";
    		player addItemToUniform "MiniGrenade";
    		player addItemToUniform "SmokeShell";
    		player addVest "V_PlateCarrier_Kerry";
    		for "_i" from 1 to 2 do {player addItemToVest "SmokeShell";};
    		for "_i" from 1 to 2 do {player addItemToVest "MiniGrenade";};
    		for "_i" from 1 to 3 do {player addItemToVest "100Rnd_65x39_caseless_mag_Tracer";};
    		for "_i" from 1 to 2 do {player addItemToVest "100Rnd_65x39_caseless_mag";};
    		player addBackpack "B_AssaultPack_mcamo";
    		for "_i" from 1 to 5 do {player addItemToBackpack "100Rnd_65x39_caseless_mag_Tracer";};
    		for "_i" from 1 to 3 do {player addItemToBackpack "100Rnd_65x39_caseless_mag";};
    		player addHeadgear "H_HelmetB_grass";
    		
    		comment "Add weapons";
    		player addWeapon "arifle_MX_SW_F";
    		player addPrimaryWeaponItem "muzzle_snds_H";
    		player addPrimaryWeaponItem "acc_pointer_IR";
    		player addPrimaryWeaponItem "optic_Hamr";
    		player addWeapon "hgun_P07_snds_F";
    		player addHandgunItem "muzzle_snds_L";
    		player addWeapon "Binocular";
    		
    		comment "Add items";
    		player linkItem "ItemMap";
    		player linkItem "ItemCompass";
    		player linkItem "ItemWatch";
    		player linkItem "ItemRadio";
    		player linkItem "ItemGPS";
    		player linkItem "NVGoggles";
    	};
    };
    |TG-189th| Unkl
    ArmA 3 Game Officer
    Dean of Tactical Gamer University
    189th Infantry Brigade Member
    SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
    "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

Connect

Collapse

TeamSpeak 3 Server

Collapse

Advertisement

Collapse

Twitter Feed

Collapse

Working...
X