pick up

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

skanto123

Active Member
Jan 8, 2018
70
0
0
variables:
{blb.cobblestone.%player%} = false

how do I make it when I do the command /test it sets {blb.cobblestone.%player%} to true and when {blb.cobblestone.%player%} is on true you cannot pickup cobblestone it just stays on the ground dosnt go into your inventory
 
Just set the variable to true with a custom command, then use the on pick up event. check if the variable is true in that event and if the event-item is cobblestone. And if so, cancel the event.
[doublepost=1516996604,1516996389][/doublepost]So something to the effect of this
code_language.skript:
command /test:
    trigger:
        if {variable} is false:
            set {variable} to true
        else:
            set {variable} to false

on pick up:
    if event-item is cobblestone:
        if {variable} is true:
            cancel event
 
Status
Not open for further replies.