Lou Montana
You have to make a little delay (sleep 0.001; (not less)) to use this command, else you will be returned an empty string.
Results appear below as you type; use the arrow keys to move through them.
Command · also in Unit Inventory · Markdown · JSON · original wiki page
Return the name of the currently selected weapon (on the primary turret for vehicles).
currentWeapon vehicle
Parameters:
vehicle: ObjectReturns: String
_weaponClass = currentWeapon (vehicle player);//Example: "M16A2GL"
_weaponClass = currentWeapon player;
currentMagazine · currentMuzzle · currentThrowable · currentVisionMode · currentWeaponMode · currentZeroing · magazinesTurret · weaponsTurret · currentWeaponTurret · weaponState
You have to make a little delay (sleep 0.001; (not less)) to use this command, else you will be returned an empty string.
It seems it is not working in 1.02 for other unit than player.
This works for vehicles providing there is a gunner