Solved Groupmanager // colorname doesn't work together

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

Gino

Member
Apr 10, 2017
24
4
0
25
  1. command /color <string>:
  2. permission: color.use
  3. trigger:
  4. set {_c::*} to split "0123456789abcdef" at ""
  5. if {_c::*} does not contain arg-1:
  6. message "&cInvalid color! Use %join {_c::*} with "", ""%"
  7. else:
  8. set {color::%uuid of player%} to colored "&%arg-1%"
  9. message "&aColor changed to &%arg-1%%arg-1%"
  10. command /namecolor:
  11. permission: color.use
  12. trigger:
  13. open chest inventory with 3 rows named "&aChoose a color" to player
  14. set {_c::*} to split "0123456789abcdef" at ""
  15. set {_items::*} to black wool, blue wool, green wool, cyan wool, red wool, purple wool, orange wool, gray wool, dark gray wool, light blue wool, light green wool, light blue wool, pink wool, magenta wool, yellow wool, white wool
  16. set {_i} to 0
  17. loop {_c::*}:
  18. set {_t} to loop-value
  19. create gui slot {_i} of player with {_items::%loop-index%} named colored "&%loop-value%%loop-value%" to run:
  20. make player execute command "color %{_t}%"
  21. close inventory of player
  22. add 1 to {_i}
  23. on chat:
  24. {color::%uuid of player%} is set
  25. set nickname of player to "%{color::%uuid of player%}%%player%"
  26. # replace every "[player]" in chat format with "%{color::%uuid of player%}%[player]&r"

The problem:
Everything works fine, excepts that the Groupmanager groups doesn't show
 
Add the prefix of the player to the nickname.
 
  • Like
Reactions: Gino
Code:
command /color <string>:
    permission: color.use
    trigger:
        set {_c::*} to split "0123456789abcdef" at ""
        if {_c::*} does not contain arg-1:
            message "&cInvalid color! Use %join {_c::*} with "", ""%"
        else:
            set {color::%uuid of player%} to colored "&%arg-1%"
            message "&aColor changed to &%arg-1%%arg-1%"
      
command /namecolor:
    permission: color.use
    trigger:
        open chest inventory with 3 rows named "&aChoose a color" to player
        set {_c::*} to split "0123456789abcdef" at ""
        set {_items::*} to black wool, blue wool, green wool, cyan wool, red wool, purple wool, orange wool, gray wool, dark gray wool, light blue wool, light green wool, light blue wool, pink wool, magenta wool, yellow wool, white wool
        set {_i} to 0
        loop {_c::*}:
            set {_t} to loop-value
            create gui slot {_i} of player with {_items::%loop-index%} named colored "&%loop-value%%loop-value%" to run:
                make player execute command "color %{_t}%"
                close inventory of player
            add 1 to {_i}
      
on chat:
    {color::%uuid of player%} is set
    set nickname of player to "%prefix of player%%{color::%uuid of player%}%%player%"
 
  • Like
Reactions: Gino
Code:
command /color <string>:
    permission: color.use
    trigger:
        set {_c::*} to split "0123456789abcdef" at ""
        if {_c::*} does not contain arg-1:
            message "&cInvalid color! Use %join {_c::*} with "", ""%"
        else:
            set {color::%uuid of player%} to colored "&%arg-1%"
            message "&aColor changed to &%arg-1%%arg-1%"
     
command /namecolor:
    permission: color.use
    trigger:
        open chest inventory with 3 rows named "&aChoose a color" to player
        set {_c::*} to split "0123456789abcdef" at ""
        set {_items::*} to black wool, blue wool, green wool, cyan wool, red wool, purple wool, orange wool, gray wool, dark gray wool, light blue wool, light green wool, light blue wool, pink wool, magenta wool, yellow wool, white wool
        set {_i} to 0
        loop {_c::*}:
            set {_t} to loop-value
            create gui slot {_i} of player with {_items::%loop-index%} named colored "&%loop-value%%loop-value%" to run:
                make player execute command "color %{_t}%"
                close inventory of player
            add 1 to {_i}
     
on chat:
    {color::%uuid of player%} is set
    set nickname of player to "%prefix of player%%{color::%uuid of player%}%%player%"
Thanks!
 
Status
Not open for further replies.