fix CBA_fnc_selectWeapon, add CBA_fnc_isPerson and CBA_fnc_canUseWeapon #219

merged 1 commit into from Dec 15, 2015


None yet

5 participants

commy2 commented Dec 15, 2015


  • CBA_fnc_selectWeapon doesn't work when the unit is in a firing from vehicles slot.
  • CBA_fnc_selectWeapon doesn't work when the local player has not the same weapon as the unit.


  • CBA_fnc_selectWeapon can now select vehicle weapons.
  • CBA_fnc_selectWeapon has an optional paramter to select a specific weapon mode.
  • CBA_fnc_isPerson which checks if an object is a person (soldier, civilian etc.).
  • CBA_fnc_canUseWeapon which checks if a unit can currently use it's rifle, pistol or launcher. (Basically true on foot and in FFV slots, proved itself very usefull in ACE)
@Killswitch00 Killswitch00 merged commit cfd6723 into CBATeam:master Dec 15, 2015

Wouldn't this cause errors if line 36 was false


no its get converted to a typeOf _unit in L36


Yes, but only when L36 is true 😄


Ah wait, params default value to the rescue! Ignore me, I'm hungover 😄


"a weapon mode of specified." ?

@ViperMaul ViperMaul modified the milestone: 2.2.1 Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment