mr_shadow 4 Posted January 6, 2016 Hello, does anyone know if there is a way to reload the launcher with script? For example I have a player and added him "launch_NLAW_F", is there a way to reload it or setammo of it? I dont want the unit have a backpack on his skin. I have tryed to setammo of currentweapon and secondaryweapon but it seems to me that this command does not work with launchers. Share this post Link to post Share on other sites
Guest Posted January 6, 2016 Maybe you can use www.community.bistudio.com/wiki/loadMagazine :) Share this post Link to post Share on other sites
mr_shadow 4 Posted January 6, 2016 I've tryed vehicle player loadMagazine [[0],"launch_NLAW_F","NLAW_F"]; which doesn't work. Share this post Link to post Share on other sites
Guest Posted January 6, 2016 I will try something in a few minutes I will tell you what Share this post Link to post Share on other sites
Guest Posted January 6, 2016 Here you go. player addWeapon "launch_NLAW_F"; // Add the weapon to the player player addSecondaryWeaponItem "NLAW_F"; // Add the magazine to the secondary Weapon // You may also use player addWeapon "SomeRifleClassName"; player addPrimaryWeaponItem "Magazine"; // player addWeapon "SomePistolClassName"; player addHandgunItem "Magazine"; // More detailled way player addWeaponItem ["ClassName", "Mag"]; player addWeaponItem ["ClassName", ["Mag",ammoCount, muzzleName]]; // Use Muzzle Name with GL Always remember that if you want to do this the right way (modulable) you can find the right magazines in the configs and use _unit and _classname as parameters of your function EDIT : Fixed thanks to @Bnae, I did not double checked the code. Share this post Link to post Share on other sites
mr_shadow 4 Posted January 6, 2016 No, that doesn't work. Share this post Link to post Share on other sites
Guest Posted January 6, 2016 Sorry for you, it does work for me. Share this post Link to post Share on other sites
mr_shadow 4 Posted January 6, 2016 Do you have a backpack? Share this post Link to post Share on other sites
Guest Posted January 6, 2016 Nope. I will send you a test mission Share this post Link to post Share on other sites
Guest Posted January 6, 2016 Here is the test mission. https://mega.nz/#!VdRniZgK!Y4ZCTXj61xKY5xOvLnXmt9fDpTkWFdWPBb9vwVe86ks Share this post Link to post Share on other sites
Bnae 1431 Posted January 6, 2016 You missed one double comma. You probably noticed that. player addWeapon "launch_NLAW_F"; // Add the weapon to the player player addSecondaryWeaponItem "NLAW_F"; // Add the magazine to the secondary Weapon Share this post Link to post Share on other sites
mr_shadow 4 Posted January 7, 2016 Thing that helped me: player addbackpack "B_Kitbag_sgg"; player addSecondaryWeaponItem "NLAW_F"; removebackpack player; Share this post Link to post Share on other sites
Guest Posted January 7, 2016 You missed one double comma. You probably noticed that. player addWeapon "launch_NLAW_F"; // Add the weapon to the player player addSecondaryWeaponItem "NLAW_F"; // Add the magazine to the secondary Weapon This works and you don't need that kind of "hack" thing. Share this post Link to post Share on other sites
Bnae 1431 Posted January 7, 2016 Tested in editor without any problems in player init comment "Remove existing items"; removeAllWeapons this; removeAllItems this; removeAllAssignedItems this; removeUniform this; removeVest this; removeBackpack this; removeHeadgear this; removeGoggles this; comment "Add weapons"; this addWeapon "launch_NLAW_F"; comment "Add items"; this linkItem "ItemMap"; this linkItem "ItemCompass"; this linkItem "ItemWatch"; comment "Set identity"; this setFace "WhiteHead_20"; this setSpeaker "Male01GRE"; player addWeapon "launch_NLAW_F"; player addSecondaryWeaponItem "NLAW_F"; Share this post Link to post Share on other sites
Joe98 92 Posted January 8, 2016 There is also a command for unlimited ammo (sorry currently on the mobile). 1 Share this post Link to post Share on other sites