Undeceived 392 Posted September 25, 2015 Hello guys. If I understand things correctly, the only way to set up a whitelisted Arsenal (an Arsenal with chosen gear in it) is by "virtually" adding stuff into a box, then launching the Arsenal via the action menu after getting to the box. But I don't want the damn action menu stuff. <_< I want to launch the Arsenal with my preset gear right at mission start and via script, without the player having to approach a box and selecting the right action.I tried out every possible bullshit, but no avail... :D Any solution or idea? Many thanks. Share this post Link to post Share on other sites
Larrow 2828 Posted September 25, 2015 Untested but the flow should look something like.. //wait until after briefing sleep 0.1; //Sart a loading screen to hide init behind ( preload( although has its own ) + making whitelist ) [ "myLoadingScreen" ] call BIS_fnc_startLoadingScreen; //Preload arsenal lists [ "Preload" ] call BIS_fnc_arsenal; //Make sure player object is available waitUntil { !isNull player }; //Add all your stuff to the PLAYER ( all it does is sets some variables on an object, that object then acts as arsenal whitelist ) //[ whitelist object, STUFF, isglobal, add action ] [ player, [ /*STUFF*/ ], false, false ] call BIS_fnc_addVirtual#Cargo; //End the loading screen [ "myLoadingScreen" ] call BIS_fnc_endLoadingScreen; //Pop open the arsenal display - [ full version, object that holds whitelist, object to alter ( user of arsenal ) ] ["Open",[false,player, player]] call bis_fnc_arsenal; 1 Share this post Link to post Share on other sites
Undeceived 392 Posted September 25, 2015 Larrow, you're the best!! :wub: Thanks a lot, man! This is the little whitelisted Arsenal with some allowed gear (weapons, mags and items), launched in the init.sqf: //wait until after briefing sleep 0.1; //Sart a loading screen to hide init behind ( preload( although has its own ) + making whitelist ) [ "myLoadingScreen" ] call BIS_fnc_startLoadingScreen; //Preload arsenal lists [ "Preload" ] call BIS_fnc_arsenal; //Make sure player object is available waitUntil { !isNull player }; //Add all your stuff to the PLAYER ( all it does is sets some variables on an object, that object then acts as arsenal whitelist ) //[ whitelist object, STUFF, isglobal, add action ] [ player, [ "CUP_arifle_G36K_camo","CUP_launch_M136" ], false, false ] call BIS_fnc_addVirtualWeaponCargo; [ player, [ "CUP_30Rnd_556x45_G36","CUP_M136_M" ], false, false ] call BIS_fnc_addVirtualMagazineCargo; [ player, [ "CUP_muzzle_snds_G36_desert" ], false, false ] call BIS_fnc_addVirtualItemCargo; //End the loading screen [ "myLoadingScreen" ] call BIS_fnc_endLoadingScreen; //Pop open the arsenal display - [ full version, object that holds whitelist, object to alter ( user of arsenal ) ] ["Open",[false,player, player]] call bis_fnc_arsenal; Thanks again! Share this post Link to post Share on other sites
kibaBG 54 Posted July 1, 2022 I tested the code above and it only bricks the game. Share this post Link to post Share on other sites
Harzach 2518 Posted July 1, 2022 30 minutes ago, kibaBG said: I tested the code above and it only bricks the game. Probably copy/paste corruption. I get invisible characters when I copy either code block. But also, how and when are you running it? This should be clean: //wait until after briefing sleep 0.1; //Sart a loading screen to hide init behind ( preload( although has its own ) + making whitelist ) [ "myLoadingScreen" ] call BIS_fnc_startLoadingScreen; //Preload arsenal lists [ "Preload" ] call BIS_fnc_arsenal; //Make sure player object is available waitUntil { !isNull player }; //Add all your stuff to the PLAYER ( all it does is sets some variables on an object, that object then acts as arsenal whitelist ) //[ whitelist object, STUFF, isglobal, add action ] [ player, [ "CUP_arifle_G36K_camo","CUP_launch_M136" ], false, false ] call BIS_fnc_addVirtualWeaponCargo; [ player, [ "CUP_30Rnd_556x45_G36","CUP_M136_M" ], false, false ] call BIS_fnc_addVirtualMagazineCargo; [ player, [ "CUP_muzzle_snds_G36_desert" ], false, false ] call BIS_fnc_addVirtualItemCargo; //End the loading screen [ "myLoadingScreen" ] call BIS_fnc_endLoadingScreen; //Pop open the arsenal display - [ full version, object that holds whitelist, object to alter ( user of arsenal ) ] ["Open",[false,player, player]] call bis_fnc_arsenal; 2 Share this post Link to post Share on other sites
kibaBG 54 Posted July 1, 2022 @Harzach your code runs now, thanks man. 😀 But should I use it in initPlayerLocal.sqf and onPlayerRespawn.sqf instead of init.sqf? Probably it should be local to different players? Edit: Just tested it, works perfectly used in initPlayerLocal.sqf and initPlayerLocal.sqf, just removed sleep. 1 Share this post Link to post Share on other sites