Solved Convert %nl% and Colour codes

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

JuliHatSpaB

Member
Aug 18, 2023
43
1
8
22
I want to make a ban script, where the player can enter a reason for the ban but colour codes and %nl% and other things aren't working. If I enter "&c&lYou are banned because of%nl%&cSpam%nl%&cHacking" in the command then the message the player gets looks like this:
1711888940002.png

Do you know any way to convert the text?
The essential code:

Code:
set {banreason::%uuid of arg-1%} to arg-3
#.
#.
#.
kick player due to "%{prefix}%%nl%%{banreason::%uuid of player%}%"
 
I want to make a ban script, where the player can enter a reason for the ban but colour codes and %nl% and other things aren't working. If I enter "&c&lYou are banned because of%nl%&cSpam%nl%&cHacking" in the command then the message the player gets looks like this: View attachment 8408
Do you know any way to convert the text?
The essential code:

Code:
set {banreason::%uuid of arg-1%} to arg-3
#.
#.
#.
kick player due to "%{prefix}%%nl%%{banreason::%uuid of player%}%"
So you're trying to use a variable through in-game commands? It siimply does not work.
But there alre alternative plugins for the use of color codes on chats but while you're working with Skript, the Skript itself does not support in-game variables nor commands. I may suggest that you will seek for custom Addons for this specific case.