notproplayer3 5 Posted January 28, 2018 The situation is simple: in a trigger I put _backpack = backpackItems player; "rhs_weapon_svdp_wd" in _backpack; as the condition and in the activation I just put hint "hi"; so you probably guessed that the trigger is supposed to activate when the player has picked up this specific weapon, but for some reason it won't work Share this post Link to post Share on other sites
gc8 977 Posted January 28, 2018 check also uniformItems and vestItems "rhs_weapon_svdp_wd" in ((vestItems player) + (uniformItems player) + (backpackItems player)) Share this post Link to post Share on other sites
notproplayer3 5 Posted January 28, 2018 still isn't working, I don't know if it is related to the fact that the gun is equipped and not in a backpack or in a vest but I tried putting it in the inventory and sill it wouldn't work Share this post Link to post Share on other sites
Schatten 289 Posted January 28, 2018 @notproplayer3, in command compares strings using case sensitive basis. So use either correctly class name or case insensitive comparing. Share this post Link to post Share on other sites
notproplayer3 5 Posted January 28, 2018 Thanks, I have fixed the classname but now there's another problem, the trigger is now activating when I've got my gun in my backpack or in another place, but it isn't activating when I've got it equiped Share this post Link to post Share on other sites
Schatten 289 Posted January 28, 2018 @notproplayer3, sure, commands like backpackItems doesn't return assigned to weapon items, so use commands like primaryWeaponItems. Share this post Link to post Share on other sites
notproplayer3 5 Posted January 28, 2018 Thanks a lot to both of you, this now works perfectly Share this post Link to post Share on other sites
pierremgi 4890 Posted January 28, 2018 For any weapon (not only primary one) in its slot (not in backpack), you can use hasWeapon command (not case sensitive). Share this post Link to post Share on other sites
notproplayer3 5 Posted January 29, 2018 Ok, it is always good to know, I used the weapons command coupled with the in command like gr8 suggested it to me but I think your's is much better in that specific scenario where we need to check if a unit has a specific type of gun. Thanks for your post Share this post Link to post Share on other sites