Checking inventory of a player for a item

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

Status
Not open for further replies.

SoMuchWessel

Active Member
Apr 3, 2017
147
3
18
Hello,

I want to make a command that looks like this:
code_language.skript:
command /check <player>:
    trigger:
        loop all items in the inventory of %arg-1%:
            if loop-item is diamond block:
                broadcast "&Yes"

But this doesn't work like how it is above.

Can you guys help me out?
 
Hello,

I want to make a command that looks like this:
code_language.skript:
command /check <player>:
    trigger:
        loop all items in the inventory of %arg-1%:
            if loop-item is diamond block:
                broadcast "&Yes"

But this doesn't work like how it is above.

Can you guys help me out?
Try this?
code_language.skript:
command /check <player>:
    trigger:
        if player has diamond block:
            broadcast "yes"
 
Try this?
code_language.skript:
command /check <player>:
    trigger:
        if player has diamond block:
            broadcast "yes"

Its saying that it cant understand the condition/effect of if player has diamond block
 
That does require Skquery, btw. forgot to say that along with the code^-^
[doublepost=1501370427,1501370391][/doublepost]
Its saying that it cant understand the condition/effect of if player has diamond block
yepx3 you need the addon, I was a bit too slow on the post there
 
That does require Skquery, btw. forgot to say that along with the code^-^
[doublepost=1501370427,1501370391][/doublepost]
yepx3 you need the addon, I was a bit too slow on the post there

but i already have skquery installed
 
but i already have skquery installed
You have the latest version? It is working for me on my server
[doublepost=1501370989,1501370826][/doublepost]Actually do you have the lime fork of skquery? The documentation just says skquery, but I happen to be using the lime fork so that may make a difference.
2994f52b21.png
 
You have the latest version? It is working for me on my server
[doublepost=1501370989,1501370826][/doublepost]Actually do you have the lime fork of skquery? The documentation just says skquery, but I happen to be using the lime fork so that may make a difference.
2994f52b21.png
It doesn't require skquery
 
Status
Not open for further replies.