1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom Command (/build)

Discussion in 'Skript' started by NeonFox__, Nov 6, 2019.

  1. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Hello! I am trying to make a command where when you do "/build" for admins you can build in worldguard regions, but when you have it not on you cannot build in worldguard regions. (I am pretty garbage at skript) Here is the code I got so far.
    upload_2019-11-7_7-37-13.png
    I got some errors oof
    Code:
    Code (Text):
    1. command /build:
    2. permission: "buildbypass.admin"
    3. permission message: &4Denied Access!&cYou do not have permission to use this command!
    4. trigger:
    5.   on break:
    6.     if player has permission "buildbypass.admin"
    7.     stop
    8.   else:
    9.     send "&cYou don't have build mode on! Do &e/build &cif you want to build anywhere!"
    Cheers if you message me on discord "ugly scp tato#3884" or reply to me with the complete code!
     

    Attached Files:

  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    you are attempting to use an event within a trigger.

    This is the basic structure of Skript
    Code (Skript):
    1. event:
    2.     condition:
    3.         effect
    You cant use an event within another event/trigger(command).

    Your best bet is to create a variable in your command, setting it to true/false, and then use an event, check the variable, and cancel event if need be.
     
  3. NeonFox__

    NeonFox__ Member

    Joined:
    Oct 25, 2019
    Messages:
    16
    Likes Received:
    0
    Oh, okay thanks I got it now!
     
Loading...