manofwar82 11 Posted June 2, 2017 Hi to everyone, is it possible to know what weapon or ammo a unit fire? and is it possible to show it in the debug window for an easy copy and paste? Because I remember there was something like this I hope anyone can help me on this Share this post Link to post Share on other sites
sarogahtyp 1108 Posted June 2, 2017 For sure. These wiki pages are ur friends for it: Event Handler - Fired addEventHandler idk what u mean with debug windo but you could just copy to clipboard with this: copyToClipboard Share this post Link to post Share on other sites
JSD 18 Posted June 2, 2017 You can get them without using an event handler if that suits you better. "currentweapon player" will get you the classname of the weapon, if you need display name you can use ((configFile >> "CfgWeapons" >> currentWeapon player >> "displayName") call BIS_fnc_GetCfgData) magazinesAmmo might be useful for getting magtypes and ammo of all mags on player, currentMagazine just gets you the magazine class, and player ammo currentWeapon player; will give you the ammo count for the player's current weapon. To get the display name of the current magazine use: ((configFile >> "CfgMagazines" >> currentMagazine player >> "displayName") call BIS_fnc_GetCfgData) If you copy any of these into the debug "watch" bit, it'll give you the result Hope that helps you out (: 1 Share this post Link to post Share on other sites
manofwar82 11 Posted June 18, 2017 yes JSD that was exactly what I was looking for Thank you Share this post Link to post Share on other sites
manofwar82 11 Posted June 18, 2017 What about to know the weapon a vehicle use? Share this post Link to post Share on other sites
JSD 18 Posted June 19, 2017 2 hours ago, manofwar82 said: What about to know the weapon a vehicle use? this should do: ((configFile >> "CfgWeapons" >> (vehicle player) currentWeaponTurret [0] >> "displayName") call BIS_fnc_GetCfgData) In a hunter this gives "RCWS HMG 12.7 mm". I'm not all too sure about turret paths (the "[0]", bit). It might also work with "weapons (vehicle player) select X" or "(vehicle player) weaponsTurret [0] select X" instead of the currentWeaponTurret bit, where x is whichever one you'd need, depending on what your goal is. And no worries, glad I can help (: Share this post Link to post Share on other sites
pierremgi 4903 Posted June 19, 2017 weapons cursorTarget // or vehicle player, or.... currentWeapon cursorTarget // or vehicle player, or... Share this post Link to post Share on other sites
manofwar82 11 Posted June 21, 2017 Thanks a lot guys!! Share this post Link to post Share on other sites
manofwar82 11 Posted June 23, 2017 Sorry guys, what about the ammo type? ok I figured it out sorry :P Share this post Link to post Share on other sites
manofwar82 11 Posted June 23, 2017 I'm using the unit "commandartilleryfire" but it doesn't work because when I start the mission and the artillery should fire I get the msg that said noentry in bin/config/nameofthemagazzine. I'm using it with rhs vehicle Can anyone help ? Share this post Link to post Share on other sites