Page 1 of 1

Add RifleWeaponItem.EquipLazer && HandgunWeaponItem.EquipLazer

Posted: Thu Mar 26, 2020 7:20 pm
by NearHuscarl
I am writing a method to get all of the weapons in the inventory of an IPlayer and transfer it to another IPlayer. Right now there is no way to know if the player's guns are equipped with laser or not.

Re: Add RifleWeaponItem.EquipLazer && HandgunWeaponItem.EquipLazer

Posted: Sun Apr 26, 2020 12:58 pm
by Gurt
Added after v.1.3.5:
ScriptAPI: Added IPlayer.CurrentPrimaryRangedWeapon and IPlayer.CurrentSecondaryRangedWeapon which both returns the same struct RangedWeaponItem which is the same representation as RifleWeaponItem and HandgunWeaponItem (they all three have the same properties).
ScriptAPI: Added LazerEquipped property to RangedWeaponItem, RifleWeaponItem and HandgrunWeaponItem to be able to read if a ranged weapon has a lazer upgrade attached.