#Remake script please...

1 messages · Page 1 of 1 (latest)

bitter badger
#

I need that if I put a sponge, I was given the right to build around the sponge. If I break or put around a sponge and do not have the right to build around some or someone's sponge, then I was written that construction is prohibited here.

on place:
    if event-block is sponge:
        loop all blocks in radius 15 around event-block:
            if loop-block is sponge:
                if loop-block is not event-block:
                    cancel event
                    send "&6Wardrobe where is placed!" to player
                    stop
            if loop-blocks is stone brick or chest:
                if player is {szaf::%location of event-block%::members}:
                    send "test" to player
                else:
                    cancel event
                    send "&6test!" to player
                    stop
#        set {szaf::%location of event-block%::members} to event-block
#        set {szaf::%location of event-block%::hp} to 100
on place sponge:
    add player to {szaf::%location of event-block%::members}
on right click on sponge:
    if player is sneaking:
        remove player from {szaf::%location of event-block%::members}
        send "&cYou are removed from wardrobe!" to player
    else:
        if player is {szaf::%location of event-block%::members}:
            cancel event
            send "&aYou are added in wardrobe!"
        else:
            add player to {szaf::%location of event-block%::members}
            send "&aYou are added to wardrobe!" to player
#on rightclick on chest or sponge or workbench: 
#    if distance between the player and event-block is higher than 30: 
#        send "test"
#        cancel event
jagged gust
#

use code blocks 🙏

bitter badger
jagged gust
#

so whats wrong with it

bitter badger
#

I will be grateful to you if you help me.

#

I'm making something like a closet from the Rust game.

jagged gust
#

i can't spoonfeed, i can only help fix errors with it

bitter badger