If player is holding

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Aug 28, 2023
3
0
1
35
When I have a "if player is holding..." and the player has more than one when it test for what it is holding the skript does not work
code below
 

Attachments

  • test.txt
    415 bytes · Views: 53
When I have a "if player is holding..." and the player has more than one when it test for what it is holding the skript does not work
code below
To check if a player is holding an item, use the "if player's tool is.." expression. To check how much of an item a player is holding (In the case you want to know how much of this item a player has), you can do "set {_exam} to amount of stone button in player's inventory".

However, if you wish to check specifically actual amount of something a player is holding you could potentially use Bensku Dev 24 or higher [Expression: item amount of player's tool] (Keep in mind, this info could be outdated and there could be a workaround for this I have not come across).
 
To check if a player is holding an item, use the "if player's tool is.." expression. To check how much of an item a player is holding (In the case you want to know how much of this item a player has), you can do "set {_exam} to amount of stone button in player's inventory".

However, if you wish to check specifically actual amount of something a player is holding you could potentially use Bensku Dev 24 or higher [Expression: item amount of player's tool] (Keep in mind, this info could be outdated and there could be a workaround for this I have not come across).
When I used "if player's tool is..." it still didn't work. I do not need to check how much a player but if the player has any amount of it when I use
"if player's tool is tripwire hook named "{@afk}" with lore "" and "{@keylore}":" it works only when there is one of that item but if there is any amount greater than one it doesn't work.
 
When I used "if player's tool is..." it still didn't work. I do not need to check how much a player but if the player has any amount of it when I use
"if player's tool is tripwire hook named "{@afk}" with lore "" and "{@keylore}":" it works only when there is one of that item but if there is any amount greater than one it doesn't work.
if one of player's tool is one of...