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 I want to make a chat color command

Discussion in 'Skript' started by WhoCutTheCheese, Apr 29, 2020.

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

    Joined:
    Apr 22, 2020
    Messages:
    13
    Likes Received:
    1
    So I am very new to skript, I know basic things like making simple commands but I have something that I don't know how to do.
    I want to make a /color command where you can /color <color here>.
    The colors will just be all the essentials colors e.g /color red or /color lightred and it will set your chat color red or light red.
    Now I'm not completely sure if it is possible.
    I have pretty much every skript addon.
    If you could help or make a skript that would work it would be greatly appreciated.
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Try:
    Code (Skript):
    1.  
    2. command /color [<string>]:
    3.     trigger:
    4.         arg 1 is "green":
    5.             set {chatcolor.%player%} to "&2"
    6.             send "&eNow you will write in &2green&e!"
    7.          
    8. on chat:
    9.     cancel event
    10.     broadcast "%coloured player's displayname%&f: %{chatcolor.%player%}%%message%"
    11.  
    There you do it with the rest of the colors. Here I did a short code.
     
  3. WhoCutTheCheese

    Joined:
    Apr 22, 2020
    Messages:
    13
    Likes Received:
    1

    Alright ill try that
    --- Double Post Merged, Apr 29, 2020, Original Post Date: Apr 29, 2020 ---
    Works!
     
  4. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Mark post as solved.
     
    • Like Like x 1
  5. WhoCutTheCheese

    Joined:
    Apr 22, 2020
    Messages:
    13
    Likes Received:
    1
    Done
    --- Double Post Merged, Apr 29, 2020, Original Post Date: Apr 29, 2020 ---
    The only issue with the skript is when a new player joins it says Playername: <NONE> message
    I want it to set them to gray automatically
    unless they have set their color
     
  6. Dave

    Dave Active Member

    Joined:
    Jul 20, 2018
    Messages:
    228
    Likes Received:
    9
    Code (Text):
    1. on join:
    2.     if {chatcolor.%player%} is not set:
    3.         set {chatcolor.%player%} to "&f"
     
  7. WhoCutTheCheese

    Joined:
    Apr 22, 2020
    Messages:
    13
    Likes Received:
    1
    Thanks ill try that
    later
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...