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

    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
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.
 
MundoSK seems to be 1.8.8+, while I run 1.7.10. Is there any alternative or a version of MundoSK which supports 1.7.10?
Not really, you could maybe do it with skellett but its 1.7 packets are hit or miss. I won't support 1.7 packets.
 
just add a else check if player variables set in Autobroadcast or what... or is this not coding with Skript?
 
just add a else check if player variables set in Autobroadcast or what... or is this not coding with Skript?
No it isn't created in Skript. I will recreate this in Skript and then do that. Thanks for the help. Marking as solved.
 
Status
Not open for further replies.