Solved Stop all messages from appearing in chat

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

verycoolguy123

Active Member
Jul 31, 2017
70
2
0
53
So, I was looking for a way to stop a user from seeing other user's chat messages using a command to toggle it. I managed to find a skript posted by another user and applied my own changes on it. I was wondering how I'd be able to do this for everything in chat, including announcements
(Like this:
upload_2017-8-12_22-17-39.png
). Here is my current code:
code_language.skript:
on chat:
    cancel event
    loop all players:
        if {Chat.%loop-player%} is not set:
            send "%colored player's prefix%%player%&7: &f%message%" to loop-player
 
command /toggleglobalchat [<text>]:
    aliases: /tgc
    trigger:
        if arg-1 is set:
            send "&cUsage: /tgc"
        else:
            if {Chat.%player%} is set:
                delete {Chat.%player%}
                send "&aYou have enabled global chat"
            else:
                send "&cYou have disabled global chat"
                set {Chat.%player%} to true
 
Not sure what you mean, that should work.


Edit: nevermind, I see what you mean. It wouldn't be possible unless you hook it into all the different plugins you want to disable.
 
Status
Not open for further replies.