Skip to main content

hasWeaponComponent

xPlayer.hasWeaponComponent(weaponName, weaponComponent)

This functions returns an boolean if the player has the specified weapon component for a given weapon. The available component list can be found in the weapon configuration file (config.weapons.lua).

Arguments

ArgumentData TypeOptionalDefault ValueExplanation
weaponNamestringNo-Weapon name
weaponComponentstringNo-Weapon component