xPlayer.hasWeapon

1
xPlayer.hasWeapon(weaponName)

This functions returns if the player has the specified weapon.

Argument

Argument Data Type Optional Default Value Explanation
weaponName string No - Weapon name

xPlayer.hasWeapon Exemplo

1
2
3
4
5
    if xPlayer.hasWeapon('WEAPON_PISTOL') then
        print('found weapon')
    else
        print('weapon not found!')
    end