Need help!

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

FionoNetwork

Member
Jun 6, 2018
3
0
1
Hello! Im making a skript that prevents players from breaking/placing blocks, They are allowed to place blocks on red-hardened-clay. But now i wanted to add so you can place ladders only on yellow-hardened-clay, How can i add that to my current skript?

Code:

Code:
command /toggleblockbreaking:
    permission: tbb.toggle
    trigger:
        if {%player%.SBB} is 0:
            set {%player%.SBB} to 1
            message "{@ServerPrefix} » &aYou can now break blocks."
            stop
        if {%player%.SBB} is 1:
            set {%player%.SBB} to 0
            message "{@ServerPrefix} » &cYou can now not longer break blocks."
            stop
command /tbb:
    permission: tbb.toggle
    trigger:
        if {%player%.SBB} is 0:
            set {%player%.SBB} to 1
            message "{@ServerPrefix} » &aYou can now break blocks."
            stop
        if {%player%.SBB} is 1:
            set {%player%.SBB} to 0
            message "{@ServerPrefix} » &cYou can now not longer break blocks."
            stop

#   Stops-block-breaking
on block break:
    if {%player%.SBB} is 0:
        message "{@ServerPrefix} » &cYou are not allowed to break blocks!"
        cancel event
        stop
    if {%player%.SBB} is 1:
        message "{@ServerPrefix} » &aYou broke this block with succes!"
        stop

on block place:
    if block under event-block is not red hardened clay:
        if {%player%.SBB} is 0:
            message "{@ServerPrefix} » &cYou are not allowed to place blocks!"
            cancel event
            stop
        if {%player%.SBB} is 1:
            chance of 75%:
                message "{@ServerPrefix} » &aYou placed this block with succes!"
                stop
            chance of 25%:
                cancel event
                message "{@ServerPrefix} » &c&nThis block has made an error. Please try again."
                stop
 
Try using targeted block of player, it's the block they're looking at so it's the block they're going to place a ladder against
 
And don't start your variables with a expression (e.g. player). To remove some of your stops, use else and else if
 
Status
Not open for further replies.