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.

Solved send message to another player

Discussion in 'Skript' started by FallingCatus, Apr 29, 2018.

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

    FallingCatus Member

    Joined:
    Jun 29, 2017
    Messages:
    38
    Likes Received:
    0
    Hey all, just a simple one hopefully...

    So i am just wondering how i would send a message to another player, not the player that executed the command...

    this is what i have so far but cant seem to send the message to arg 1 on line 17

    no errors when loading skript.

    Code (Skript):
    1. command /sellblocks [<player>] [<text>] [<text>] :
    2.     usage: /sellblocks <text> <text> <text>
    3.     description: sell claim blocks to players.
    4.     permission: sell.blocks
    5.     permission message: &a&lCactus&f&lAdmin &8> &aNice try!
    6.     trigger:
    7.         set {_buyer} to arg-1
    8.         set {_blocks} to arg-2
    9.         set {_price} to arg-3
    10.         set {_player} to player
    11.         wait 1 ticks
    12.         if arg-3 is set:
    13.             open virtual chest inventory with 1 rows named "&e&lConfirm &e&lyour &e&lsale!" to player
    14.             create a gui slot 0 of player with Light Blue Stained Glass Pane named "&f" to do nothing
    15.             create a gui slot 1 of player with Light Blue Stained Glass Pane named "&f" to do nothing
    16.             create a gui slot 2 of player with light green wool named "&a&lConfirm" with lore "&7||&7Blocks: &e%{_blocks}%||&7Price: &2$&f%{_price}%||&7Buyer: &b%{_buyer}%||&7" to close:
    17.                 send "&ethis is a test message." to arg-1
    18.                 send "&eYour sale proposal has been sent to &b%{_buyer}%&e."
    19.             create a gui slot 3 of player with Light Blue Stained Glass Pane named "&f" to do nothing
    20.             create a gui slot 4 of player with Light Blue Stained Glass Pane named "&f" to do nothing
    21.             create a gui slot 5 of player with Light Blue Stained Glass Pane named "&f" to do nothing
    22.             create a gui slot 6 of player with red wool named "&c&lCancel" with lore "&7Close the gui." to close:
    23.                 send "&eYour sale has been closed %{_player}%."
    24.             create a gui slot 7 of player with Light Blue Stained Glass Pane named "&f" to do nothing
    25.             create a gui slot 8 of player with Light Blue Stained Glass Pane named "&f" to do nothing
     
  2. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    in tuske advanced guis you cant reference the args so just set the player arg to a local variable and use that
     
  3. FallingCatus

    FallingCatus Member

    Joined:
    Jun 29, 2017
    Messages:
    38
    Likes Received:
    0
    was not aware of that, thanks Donut, great help as always <3
     
Thread Status:
Not open for further replies.

Share This Page

Loading...