Solved Help with break event

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

GiorgixPRO

Member
Jul 29, 2017
44
0
0
25
I want that the player can't break the block if isn't placed by him, how?

THIS IS MINE SKRIPT BUT IT DOESN'T WORK:

code_language.skript:
on break:
    if %block% is placed by %player%:
        wait 1 tick
    else:
        cancel event

Is it possible?
Thanks.
 
I want that the player can't break the block if isn't placed by him, how?

THIS IS MINE SKRIPT BUT IT DOESN'T WORK:

code_language.skript:
on break:
    if %block% is placed by %player%:
        wait 1 tick
    else:
        cancel event

Is it possible?
Thanks.
first of all, dont scream at us in bold caps lock.

second of all, you could be a little more descriptive than saying IT DOESNT WORK

third of all, dont use percent signs except in nested variables or when sending an expression in a message

fourth of all, what the hell are you trying to do? check if the block was placed by a specific player? or just a player in general?
 
first of all, dont scream at us in bold caps lock.

second of all, you could be a little more descriptive than saying IT DOESNT WORK

third of all, dont use percent signs except in nested variables or when sending an expression in a message

fourth of all, what the hell are you trying to do? check if the block was placed by a specific player? or just a player in general?

I'm trying to create a script that when a player breaks a block he breaks it only if is placed by him, or else he keeps it in place
But the errors are:

%player%' is not a text
'else' has to be placed just after an 'if' or 'else if' section
 
I'm trying to create a script that when a player breaks a block he breaks it only if is placed by him, or else he keeps it in place
But the errors are:

%player%' is not a text
'else' has to be placed just after an 'if' or 'else if' section
You can't make a "Claim Blocks" with 4 line. xD You need saved into Variables (if you know what this is, else learn simpler stuff), and other events...
 
I'm trying to create a script that when a player breaks a block he breaks it only if is placed by him, or else he keeps it in place
But the errors are:

%player%' is not a text
'else' has to be placed just after an 'if' or 'else if' section
ah i see. like i said above you only use percent signs in variables and when sending expressions in messages. also theres no condition to check who placed the block (as far as i know)

you can do something like this:
code_language.skript:
on place:
    set {placed::%event-block's location%} to player

on break:
    if {placed::%event-block's location%} is player:
        #do stuff
    else:
        #do other stuff
 
code_language.skript:
on inventory click:
    if clicked item is <insert item here> named "something" with lore "something": #name and lore is optional
        cancel event
[doublepost=1501336497,1501336437][/doublepost]also if the item is in their hotbar i assume you want to prevent them from dropping it
code_language.skript:
on drop of <insert item here>:
    cancel event
 
Status
Not open for further replies.