gc8 970 Posted November 7, 2017 Hey can anyone tell how do you pick weapons from ground via script? I am able to get the WeaponHolderSimulated object with this: player nearEntities 5; But I don't know how to turn that to real weapon (name). thx! Share this post Link to post Share on other sites
pierremgi 4736 Posted November 7, 2017 If you have a weapon in a weaponHolderSimulated, you can pick it up. Usually to spawn a weapon, you create this "weaponHolderSimulated", then addWeaponCargoGlobal some weapon inside (after the addMagazineCargoGlobal). You need to choose the class in config viewer cfgWeapons 1 Share this post Link to post Share on other sites
gc8 970 Posted November 7, 2017 12 minutes ago, pierremgi said: If you have a weapon in a weaponHolderSimulated, you can pick it up. Usually to spawn a weapon, you create this "weaponHolderSimulated", then addWeaponCargoGlobal some weapon inside (after the addMagazineCargoGlobal). You need to choose the class in config viewer cfgWeapons So the solution was to call getWeaponCargo on the weaponHolderSimulated. thanks :) 1 Share this post Link to post Share on other sites
pierremgi 4736 Posted November 7, 2017 29 minutes ago, gc8 said: So the solution was to call getWeaponCargo on the weaponHolderSimulated. thanks :) Ah OK, you just needed the class name of the weapon, not pick the weapon up while in game. Sorry for this misunderstanding. My French language plays tricks on me sometimes.. 1 Share this post Link to post Share on other sites
gc8 970 Posted November 18, 2017 When I put weapon on ground that has magazine loaded in and try to get the mags with getMagazineCargo it returns empty arrays. Does anyone know if its possible to get the mag loaded? I also tried with these commands: getAmmoCargo _obj, magazineCargo _obj, magazinesAmmoCargo _obj Share this post Link to post Share on other sites