Checking all players inventories

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

Status
Not open for further replies.

BrownMee

Active Member
Apr 16, 2018
126
6
18
23
Code:
on every 2 seconds in "world":
    loop all players:
        if loop-players has permission "archer.use":
            if loop-player's inventory contains 64 arrow:
                stop
            else:
                give loop-players 2 arrows

If player A have 64 arrows
Player B wont able to get arrows anymore.

How do I check individually?
 
I think, you just want to get an arrow back, when you shooted. Just do following:

Code:
On shoot:
  if player has permission "archer.use":
    give player arrow
 
If you want to have something like 64 arrows in circulation and want to check individually because there may be multiple games going on or something, you might be able to assign a player/local variable to fix it.

Not totally sure as I'm not sure what you want to do. Do you mind sending the full skript?
 
Status
Not open for further replies.