Warning: file_put_contents(/ff_51e8595449eb2feba56b278ef6058e0a7c6bd4c14062f7f5.php): failed to open stream: Permission denied in /home/ofpecsav/public_html/forum/Sources/Subs-ForumFirewall.php on line 1619
selectWeapon - OFPEC Scripting Command Reference | OFPEC The Editing Center

unit selectWeapon weapon

Operand types

unit: Object
weapon: String

Type of returned value


Select given weapon.
Note: For weapons that have more than one muzzle, you have to input the muzzlename and not the weaponName.
The only weapons that have muzzlenames seem to be rifles with grenade launchers, handgrenades, smokeshells and satchels.

In all other cases the weaponName must be used.
Fortunately, in OFP, in most cases, both names are the same. But check.
In ArmA the weaponNames and muzzleNames are different.

For weaponName/muzzleName values see OFPWeapons or ArmAWeapons.

Used In



soldier1 selectWeapon "LAWLauncher"