BEAKSBY 11 Posted July 8, 2014 HI All, How do I check if the player has a particular item in his inventory? if (player weapons[] == "Laserdesignator") then {code...}; Share this post Link to post Share on other sites
TittErS 13 Posted July 8, 2014 Hi, "weapons" return an Array, used "in" for find element in an array. if ("Laserdesignator" in weapons player) then {code...}; Share this post Link to post Share on other sites
BEAKSBY 11 Posted July 8, 2014 Hi,"weapons" return an Array, used "in" for find element in an array. if ("Laserdesignator" in weapons player) then {code...}; Thanks, I just tried player hasWeapon ""Laserdesignator" and it worked. Share this post Link to post Share on other sites
D. Patterson 14 Posted July 9, 2014 Thanks,I just tried player hasWeapon ""Laserdesignator" and it worked. hasWeapon only works for weapons, there is no equivalent (no hasItem, hasGear) just keep in mind Share this post Link to post Share on other sites