Doors

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

temakan

Member
Jan 29, 2017
12
0
0
25
How to cancel the wood door opening event?

on rightclick on oak_door or 71:
cancel event

doesnt work

on rightlick:
cancel event

works but it cancels all rightlick actions

@edit i fixed it

But when i rightlick on top of the door it doesnt work, what's the id of all top of doors
 
Last edited:
on right click on door top:

on right click on door bottom:
Thanks and how to do add top of doors to variable:
I have somethign like this
on place:
if block is spruce door:
set {haslo.%block%} to "%{haslo.%player%}%"
if block is spruce door top:
set {haslo.%block%} to "%{haslo.%player%}%"

on rightclick on spruce door:
if {haslo.%block%} contains "%{haslo.%player%}%":
wait 1 tick
execute player command "/playsound block.iron_door.open block %player% ~ ~ ~"
toggle event-block
else:
cancel event
send "&cTo nie twoj blok /&a/ Jesli jestes wlascicielem kliknij na dolna czesc" to player

on rightclick on spruce door top:
if {haslo.%block%} contains "%{haslo.%player%}%":
wait 1 tick
execute player command "/playsound block.iron_door.open block %player% ~ ~ ~"
toggle event-block
else:
cancel event
send "&cTo nie twoj blok /&a/ Jesli jestes wlascicielem kliknij na dolna czesc" to player

this top doesnt work
 
try this
code_language.skript:
on place:
        if block is spruce door:
            set {haslo.%block%} to "%{haslo.%player%}%"
        if block above event-block is spruce door top:
            set {haslo.%block%} to "%{haslo.%player%}%"

on rightclick on spruce door:
    if {haslo.%block%} contains "%{haslo.%player%}%":
        wait 1 second
        execute player command "/playsound block.iron_door.open block %player% ~ ~ ~"
        toggle event-block
    else:
        cancel event
        send "&cTo nie twoj blok /&a/ Jesli jestes wlascicielem kliknij na dolna czesc" to player
      
on rightclick on spruce door top:
    if {haslo.%block%} contains "%{haslo.%player%}%":
        wait 1 second
        execute player command "/playsound block.iron_door.open block %player% ~ ~ ~"
        toggle event-block
    else:
        cancel event
        send "&cTo nie twoj blok /&a/ Jesli jestes wlascicielem kliknij na dolna czesc" to player
 
try this
code_language.skript:
on place:
        if block is spruce door:
            set {haslo.%block%} to "%{haslo.%player%}%"
        if block above event-block is spruce door top:
            set {haslo.%block%} to "%{haslo.%player%}%"

on rightclick on spruce door:
    if {haslo.%block%} contains "%{haslo.%player%}%":
        wait 1 second
        execute player command "/playsound block.iron_door.open block %player% ~ ~ ~"
        toggle event-block
    else:
        cancel event
        send "&cTo nie twoj blok /&a/ Jesli jestes wlascicielem kliknij na dolna czesc" to player
     
on rightclick on spruce door top:
    if {haslo.%block%} contains "%{haslo.%player%}%":
        wait 1 second
        execute player command "/playsound block.iron_door.open block %player% ~ ~ ~"
        toggle event-block
    else:
        cancel event
        send "&cTo nie twoj blok /&a/ Jesli jestes wlascicielem kliknij na dolna czesc" to player
doesnt work but nvm
 
Status
Not open for further replies.