Solved Amount of event-slot in player inventory

  • 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 community!

    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!

italo

New Member
Aug 8, 2023
8
0
1
Hello everyone, I have this set up:
Code:
set slot 34 of metadata tag "sellmenu" of player to 1 of ender pearl
, and a check, but it still writes "no" even if I have a full inventory of ender pearls, please help:
Code:
if event-slot is 34:
    if amount of event-slot in player's inventory >= 16:
        broadcast "yes"
    else:
        broadcast "no"
        broadcast "%event-slot%"
 
just do "if amount of ender pearls in player's inventory is >= 16:"
I can't do that, because the item in the menu will keep changing all the time. I need it so that when the item is clicked, it checks if the player has it - if they do, it gets removed from them.
 
give more information of what u need pls
Item in the menu will keep changing all the time. I need it so that when the item is clicked, it checks if the player has it - if they do, it gets removed from them.
 
if player's inventory contains 16 {_sellthingy}:
remove 16 {_sellthingy} from the player's inventory
#might have to tweak this code a bit bu try it