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

Is there any way to make arguments work work with vanilla GUI?

Discussion in 'Skript' started by BadName, Nov 11, 2020.

Thread Status:
Not open for further replies.
  1. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    Hi, im trying to make a /report plugin/script with a GUI. I was wondering if the is any way to make arguments(%arg-#%) work with Vanilla GUIs.
     
  2. Fyriiee

    Fyriiee Member

    Joined:
    Sep 30, 2020
    Messages:
    26
    Likes Received:
    0
    Follow this tutorial:
    https://forums.skunity.com/threads/vanilla-guis.8939/

    Code (Text):
    1. command /report <player>:
    2.     permission: report.perm
    3.     trigger:
    4.         if arg-1 is not set:
    5.             send "not set" to player
    6.         else:
    7.             #open chest
     
    • Useful Useful x 1
  3. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    The example that you linked does not have arguments
     
  4. Fyriiee

    Fyriiee Member

    Joined:
    Sep 30, 2020
    Messages:
    26
    Likes Received:
    0
    Do you mean opening a gui with arguments on items and stuff like that?
    So if I say, in theory:
    Code (Text):
    1. command /report <player>:
    2.     permission: report.perm
    3.     trigger:
    4.         if arg-1 is not set:
    5.             send "not set" to player
    6.         else:
    7.             #open chest with 5 items
    8.             #If I click on one, it bans arg-1
    9.             #etc
    10.  
    Yes?
     
  5. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    I want for when I click one of the items in the gui, it can send a message to ops
    Code (Text):
    1. send "%arg-1% blah blah" to ops

    how would I implement arguments? kinda new sry
     
  6. Fyriiee

    Fyriiee Member

    Joined:
    Sep 30, 2020
    Messages:
    26
    Likes Received:
    0
    I would set each argument to a gui button, so let's say we have a gui that has 5 blocks, each representing a color.
    From there I would send a message that says that "You have selected blue" or something like that.
     
  7. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    can I get an example code?
     
  8. Fyriiee

    Fyriiee Member

    Joined:
    Sep 30, 2020
    Messages:
    26
    Likes Received:
    0
    I would go look at the documentation instead of asking for code, it's pretty well documented there.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...