Custom Chat placeholer

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

Dominiiikk

Member
Nov 3, 2023
2
0
1
23
Hello, I want to make a custom placeholer, when a player's message includes "[kct]" it sends his normal message and replaces the "[kct]" part with a custom string.
1699054356639.png

This is what I want it to look like. Its from a plugin.

But mine looks like this:

1699054425882.png


Im using this code, anyone knows how to split the message into multiple parts before, and after the placeholder?
Code:
on chat:
    if message contains "[kct]":
        set {_kct} to value of placeholder "supercredits_credits" from player
        set {_m::*} to split the message by "[kct]"
        set {_t::1} to text component from "<##81e600>[Počet KCT] &r"
        set {_t::2} to text component from {_m::1}
        set {_t::0} to text component from {_m::-1}
        set hover event of {_t::1} to hover event showing text component from "<##81e600>Počet KCT hráče %player%: %{_kct}%"
        set {_d} to merge components {_t::*}
        send text component {_d} from player

Thanks.
 
Čus, přidej si mě na discordu, zkusím ti pomoct tam, aby byla rychlejší domluva.
Discord: danrub