CBA_accessory_fnc_switchAttachment

Description

Switches weapon accessories for the player.

Parameters

0: _itemTypeAttachment type (0: muzzle, 1: rail, 2: optic).  <NUMBER>
1: _switchToSwitch to “next” or “prev” attachement STRING

Returns

_successIf switching was possible and keybind should be handled <BOOLEAN>

Examples

[1, "next"] call CBA_accessory_fnc_switchAttachment;
[2, "prev"] call CBA_accessory_fnc_switchAttachment;

Author

Robalo, optimized by Anton

string used by format
Close