on chat ignorant doesn't work.

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

Castolo GR

New Member
Feb 25, 2020
3
0
1
47
I am trying to make it so that when someone ignores someone they cant see their messages and the ignored player cant see the messages from the player who ignored them.

My code:
Code:
on chat:
    loop all players:
        if {ignored.%uuid of player%::%uuid of loop-player%} is "true":
            set {chat.rec} to chat recipients
            remove player from chat recipients
            remove loop-player from chat recipients
            send formatted "<ttp: %nl%  &3Name: &f%player%%nl% %nl%  &aBalance: &f%format({balance::%player%})%%nl%  &eRank: &f%player's group%%nl%  &cPlaytime: &f%{days::%player%}%d %{hours::%player%}%h %{minutes::%player%}%m %{seconds::%player%}%ss%nl%  &bWorld: &f%player's world%%nl% >%player's prefix% %player's display name% %player's suffix%&r: %message%" to chat recipients
                  
        else:
            clear chat recipients
            send formatted "<ttp: %nl%  &3Name: &f%player%%nl% %nl%  &aBalance: &f%format({balance::%player%})%%nl%  &eRank: &f%player's group%%nl%  &cPlaytime: &f%{days::%player%}%d %{hours::%player%}%h %{minutes::%player%}%m %{seconds::%player%}%ss%nl%  &bWorld: &f%player's world%%nl% >%player's prefix% %player's display name% %player's suffix%&r: %message%" to chat recipients
 
Last edited:
If this is what doesn't work, here: (You never specified what "doesn't work")

Code:
command /ignore <offline player>:
    trigger:
        {ignored::%player%::*} doesn't contains arg:
            add arg to {ignored::%player%::*}
            send "&b%arg% added to your ignored list."
            stop
        {ignored::%player%::*} contains arg:
            remove arg from {ignored::%player%::*}
            send "&b%arg% removed from your ignored list."
on chat:
    loop all players:
        cancel event
        if {ignored::%player%::*} doesn't contain loop-player:
            send formatted "<tooltip: %nl% &3Name: &f%player% %nl%%nl%  &aBalance: &f%format({balance::%player%})%%nl%  &eRank: &f%player's group%%nl%  &cPlaytime: &f%{days::%player%}%d %{hours::%player%}%h %{minutes::%player%}%m %{seconds::%player%}%ss%nl%  &bWorld: &f%player's world%%nl% > %player's display name%" to loop-player
 
Sorry not to say :emoji_frowning:. I meant that it sends the message to everyone, even the ones that have them ignored.
 
Status
Not open for further replies.