roguetrooper 2 Posted October 6, 2017 How could it be achieved to spawn a pistol (AS THE ONLY WEAPON) into a player's inventory so that the pistol remains within the inventory and is not taken into hands automatically? When you give a player a weapon (player addweapon "weaponname") and immediately execute player action ["SWITCHWEAPON",player,player,-1] the gun still in his hands for a second. Share this post Link to post Share on other sites
Tajin 349 Posted October 6, 2017 Maybe this: anim_player = animationState player; player addWeapon "classname"; player action ["SWITCHWEAPON",player,player,-1] player switchMove anim_player; Share this post Link to post Share on other sites
7erra 629 Posted October 6, 2017 What about player addItemToUniform "hgun_Rook40_F"; ? Same goes for addItemToVest and addItemToBackpack. Share this post Link to post Share on other sites
Tajin 349 Posted October 6, 2017 Sure, that's not the same thing though. Share this post Link to post Share on other sites
Dedmen 2714 Posted October 6, 2017 https://community.bistudio.com/wiki/linkItem ? Not sure if that works with guns. I'd also go for the switchMove Share this post Link to post Share on other sites
Theo1143 18 Posted October 6, 2017 What I always do for this is just spawn a box in the editor and add this to the init: ["AmmoboxInit",[this,true]] call BIS_fnc_arsenal; Now go ingame and open the arsenal then pick whatever you want, exit the arsenal > put it in your bags etc etc... And again back to the arsenal to save or export it for use... If you know all the names it is easy to just add it like 7erra says... But if not, yea it might be easier to just use the arsenal instead. When you click on export it automatically removes everything and add's the things you've just exported(also when u put things in u bag as explained). Now you can just paste this code directly into the init of the players unit. Share this post Link to post Share on other sites
roguetrooper 2 Posted October 6, 2017 Thanks to everybody. Tajin's code does exactly what I was aiming at. Share this post Link to post Share on other sites