Help on Skbee's async chat event.

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

Radicc

Member
Oct 7, 2022
20
0
1
I've been trying for a couple of hours now trying to understand how this works.

Code:
on async chat:
    set {_m::1} to text component from "%player's prefix% %player%%player's suffix% &7» "
    set {_m::2} to "%async chat message% "
    set {_m::3} to text component from "&7[&cx&7]"
    add hover event showing "&cClick to remove this message" to {_m::3}
    set {_msg} to signed chat message
    create callback for {_m::3}:
        if player has permission "admin.chat.deletemessage":
            remove all players from {_msg}
            #set text of {_msg} to text component from "&c✖ This message was removed"
    set {_format} to merge components {_m::*}
    set async chat format to {_format}

Need a way to only show the "x" to admins and a way to change the message to "&c✖ This message was removed" if this is possible.
And also if somebody would explain to me how this works would be great, thanks.
 
Code:
on async chat:
    set {_m::1} to text component from "%player's prefix% %player%%player's suffix% &7» "
    set {_m::2} to "%async chat message% "
    set {_m::3} to text component from "&7[&cx&7]"
    add hover event showing "&cClick to remove this message" to {_m::3}
    set {_msg} to signed chat message
    create callback for {_m::3}:
        cancel event
        set {chatplayer} to player
        set {chatmessage} to message
        make all players execute command "{}admincheck"
        send "&c✖ This message was removed" to player
        set {_format} to merge components {_m::*}
        set async chat format to {_format}
command /{}admincheck:
        trigger:
                if player is op:
                        send "&8[BLOCKED] &7%{chatplayer}%: %{chatmessage}%" to player

I'm really hoping this helps out.
 
Code:
on async chat:
    set {_m::1} to text component from "%player's prefix% %player%%player's suffix% &7» "
    set {_m::2} to "%async chat message% "
    set {_m::3} to text component from "&7[&cx&7]"
    add hover event showing "&cClick to remove this message" to {_m::3}
    set {_msg} to signed chat message
    create callback for {_m::3}:
        cancel event
        set {chatplayer} to player
        set {chatmessage} to message
        make all players execute command "{}admincheck"
        send "&c✖ This message was removed" to player
        set {_format} to merge components {_m::*}
        set async chat format to {_format}
command /{}admincheck:
        trigger:
                if player is op:
                        send "&8[BLOCKED] &7%{chatplayer}%: %{chatmessage}%" to player

I'm really hoping this helps out.
No it didn't. What i want is a way to only show the "X" or delete message button to staff players.
I also want to change the message to for example: "&c✖ This message was removed" instead of the default.