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.

Trying to make /grant command

Discussion in 'Skript' started by Redblock6, Apr 13, 2019.

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

    Redblock6 Member

    Joined:
    Apr 13, 2019
    Messages:
    12
    Likes Received:
    1
    Hi,
    I'm trying to make a grant command in Skript. I do believe its possible. Here is the code so far:
    Code (Text):
    1. command /grant:
    2.     description: Grant players things
    3.     usage: &e/grant
    4.     permission: mcredblock.admin.grant
    5.     trigger:
    6.         open chest with 6 rows named "&e&lSelect a rank" to player
    7.         format slot 0 of player with redstone_block named "&c&lOWNER" to close then run [make player execute command /granttime]
    When they click the block named owner, I want it to close and then send a title saying "Say Player Name", I can do that but, I was wondering how would I do it so that when you say a player name in chat it will record that and when you are finished with the grant process then it Will record everything and make it into a big command, for example:

    /upc addGroup (player) (Group) (Time)

    Thanks,
    Redblock6
     
  2. Joni

    Joni Member

    Joined:
    Jan 5, 2019
    Messages:
    25
    Likes Received:
    0
    I did it with TuSke:
    Code (Text):
    1. command /grant:
    2.     permission: mcredblock.admin.grant
    3.     permission message: &cYou do not have access to this command.
    4.     trigger:
    5.         open virtual chest with 1 row named "&e&lSelect a rank" to player
    6.         format gui slot 0 of player with redstone block named "&c&lOWNER" to run:
    7.             set {rankchat.%player%} to false
    8.             close player's inventory
    9.             send "&aPlease type a player name in chat."
    10. on chat:
    11.     if {rankchat.%player%} if false:
    12.         cancel event
    13.         loop all players:
    14.             if message contains loop-player:
    15.                 set {rankchat.%player%} to true
    16.                 make player execute command "/upc addgroup %loop-player% owner"
    17.                 send "&a%loop-player%'s rank is now &c&lOwner&a."
    18.             else:
    19.                 send "&aPlease type an &a&lONLINE &aplayer."
     
Thread Status:
Not open for further replies.

Share This Page

Loading...