From 13560aa79d7494af653aa2d8eb078763a308a264 Mon Sep 17 00:00:00 2001 From: Dagger Date: Wed, 3 Feb 2021 18:28:39 +0000 Subject: [PATCH] Update loadout_to_backpack.sqf --- loadout_to_backpack.sqf | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 loadout_to_backpack.sqf diff --git a/loadout_to_backpack.sqf b/loadout_to_backpack.sqf new file mode 100644 index 0000000..49f5131 --- /dev/null +++ b/loadout_to_backpack.sqf @@ -0,0 +1,31 @@ +/* Simple loadswap by Dagger +TO USE: Simply place the script in the missions root folder, place down a object and add the following line to the init: +this addAction ["Swap to Dive Gear", "loadout_to_backpack.sqf"] +Note: The player will need to use the same backpack to swap back into the loadout gear. +*/ + + +// Save Player Loadout +player setVariable ["Loadout_To_Backpack",getUnitLoadout player]; + +// Add Action to Drop Backpack and Switch to Normal Loadout +player addAction ["Unload Gear from Backpack", { + player setUnitLoadout (player getVariable ["Loadout_To_Backpack",[]]); + removeAllActions player; + loadout_backpack = "rhsgref_hidf_alicepack" createVehicle position player; + loadout_backpack addAction ["Swap to Dive Gear", "loadout_to_backpack.sqf"]; +}]; + +// Prevents Duplication of players backpack +removeBackpack player; + +// Add Alice Pack +player addBackpack "rhsgref_hidf_alicepack"; + +// Add Dive Gear (You change the vaules below to change what gear it will swap to so like Dive Gear or Halo Jump Gear) +player forceAddUniform "U_B_Wetsuit"; +player addVest "V_RebreatherB"; +player addGoggles "G_B_Diving"; + +// Remove Backpack on ground +deleteVehicle objectParent loadout_backpack;