is there a way to send a message with a suggest command that uses a variable for the command

  • 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!

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

Dry Bonnoe

Member
Jun 18, 2022
13
1
3
43
this is my code
Code:
command /suggest <text> <text>:
    aliases: /sugg, /sug, /suggestcommand, /suggestcom
    permission: skript.suggestcommand
    permission message: &cYou can't do this!
    cooldown: 5 seconds
    cooldown message: &cYou must wait before doing this again!
    usage: &cUsage: /suggest <command> <description>
    trigger:
        send "<suggest command:/%arg-1%>/%arg-1% description:%arg-2%" to all players
when i try to do /sug shop test it says <suggest command:/shop>/shop description: test
 
I don't get what you're trying to do tbh, for me your code works as you made it intend to do
 
well for me it doesnt work i might need a plugin or its my version im on 1.19

You said you get "<suggest command:/shop>/shop description: test" as the result right ?
That's what your code is asking it to do. I still do not understand what is the problem.
If you could be more clear on what is the problem, what is the result you want.
 
You said you get "<suggest command:/shop>/shop description: test" as the result right ?
That's what your code is asking it to do. I still do not understand what is the problem.
If you could be more clear on what is the problem, what is the result you want.
if you send <suggest command:command> its meant to type the command for the player when they click on it like "<suggest command:/shop>test" when a player clicks on it it would time /shop for the player
 
You have to make your text clickable and redirecting to the command. You're just sending raw text rn.

EDIT: I feel a bit stupid, but forgot that <suggest command:command> was a thing ..
Doesn't work for me either so u should try the code below (SkBee required)

Code:
command /suggest <text> <text>:
    aliases: /sugg, /sug, /suggestcommand, /suggestcom
    permission: skript.suggestcommand
    permission message: &cYou can't do this!
    cooldown: 5 seconds
    cooldown message: &cYou must wait before doing this again!
    usage: &cUsage: /suggest <command> <description>
    trigger:
        set {_t} to text component from "/%arg-1% description:%arg-2%" #text you're sending to player
        set click event of {_t} to a new click event to run command arg-1 #make it clickable and run the command arg1
        send component {_t} to all players #send it to player
 
Last edited:
Status
Not open for further replies.