basic skript 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.

matin

Member
Mar 6, 2020
4
0
0
hey, how would i deny someone from breaking or placing blocks in a certain location like is there any cords i can do? something like

on break
if players x y z = 25 64 246
cancel event
(this is probs nowhere near correct)
 
if a player is in a location, they cant break blocks
Code:
on break:
    if player's location is location at 25, 64, 246:
        cancel event
if the block is in a location, it cant be broken
Code:
on break:
    if event-block's location is location at 25, 64, 246:
        cancel event
 
if a player is in a location, they cant break blocks
Code:
on break:
    if player's location is location at 25, 64, 246:
        cancel event
if the block is in a location, it cant be broken
Code:
on break:
    if event-block's location is location at 25, 64, 246:
        cancel event
any way to make that between 2 locations?
 
You'd have to check each coordinate individually, like this:
Code:
on break:
    if player's x coordinate is between 1 and 2:
        if player's y coordinate is between 5 and 10:
            if player's z coordinate is between 9 and 18:
                # do stuff
 
wow.. ok ill just world guard then. thought it was gonna be easy. is there a way to play the ui.toast.challenge_complete sound after someone buys something or after a command/
 
You can play sounds using this syntax
Code:
play %string% to %player% [at volume %number%]
It can be used like this:
Code:
play "ui.toast.challenge_complete" to player at volume 100
In a command, it is used like this
Code:
command testcmd:
    trigger:
        play "ui.toast.challenge_complete" to player at volume 100
 
Status
Not open for further replies.