Mute Command

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

BrettPlayMC

Supporter
Jan 26, 2017
715
53
28
SkUnity Street
Skript Version: Skript 2.2 (dev23)
Skript Author: Bensku
Minecraft Version: 1.8.8

Full Code:
code_language.skript:
command /mute [<offline player>] [<timespan>]:
    permission: unseenmc.mute
    permission message: &8[&4CORE&8] &7Command not found.
    trigger:
        if arg 1 is not set:
            send "&8[&4MUTE&8] &7Please specify a player. (And a timespan Ex. &c5 seconds)"
        if arg 1 is set:
            if "%arg 1%" is not "%player%":
                if arg 1 has played before:
                    if arg 2 is not set:
                        if {muted::%uuid of arg 1%} is set:
                            delete {muted::%uuid of arg 1%}
                            #send "&8[&4MUTE&8] &c%arg 1% &7has been unmuted."
                            send "&8[&4MUTE&8] &cYou &7have been unmuted." to arg 1
                            loop all players:
                                if loop-player has permission "unseenmc.mute.alert":
                                    send "&8[&4MUTE&8] &c%arg 1%&7 has been unmuted." to loop-player
                        else:
                            set {muted::%uuid of arg 1%} to true
                            loop all players:
                                if loop-player has permission "unseenmc.mute.alert":
                                    send "&8[&4MUTE&8] &c%arg 1%&7 has been permanently muted." to loop-player
                            send "&8[&4MUTE&8] &cYou &7have been permanently muted." to arg 1
                    else:
                        set {ismuted::%uuid of arg 1%} to true
                        set {muted::%uuid of arg 1%} to arg 2
                        set {muted.time::%uuid of arg 1%} to now
                        #send "&8[&4MUTE&8] &c%arg 1% &7has been muted for &c%arg 2%&7."
                        send "&8[&4MUTE&8] &cYou &7have been muted for &c%arg 2%&7." to arg 1
                        loop all players:
                            if loop-player has permission "unseenmc.mute.alert":
                                send "&8[&4MUTE&8] &c%arg 1%&7 has been muted for &c%arg 2%&7." to loop-player
                else:
                    send "&8[&4MUTE&8] &c%arg 1% &7could not be found."
            else:
                send "&8[&4MUTE&8] &7You cannot mute yourself."
Errors on Reload:
None
Console Errors:
None
Addons using (including versions):
Skellett v1.7.7dskUtilities v0.8.8skRayFall v1.9.5Umbaska v2.0 Beta 5.5.1 for Minecraft 1.10SkQuery v3.21.4TuSKe v1.7SharpSK v1.6.0RandomSK v2.0MundoSK v1.7.4WildSkript v1.8WolvSK v1.5.2SkStuff v1.6.3.6

Troubleshooting:

Have you tried searching the docs? No
Have you tried searching the forums? No
What other methods have you tried to fix it? I have tried changing the arguments a few times but this has not worked.
What you need:
Basically whenever I run "/mute ausername 5 minutes" it mutes them for 5 minutes but the message that sends to the player, instead of saying "You have been muted for 5 minutes." it says "You have been muted for <none>." Can you help me fix this? :emoji_slight_smile:
[doublepost=1487696646,1487540257][/doublepost]Humpty dumpity bumped on a wall... yeah... bump..
[doublepost=1487806279][/doublepost]bump.
 
What does it send to the player who muted the player?
 
What does it send to the player who muted the player?
code_language.skript:
                        loop all players:
                            if loop-player has permission "unseenmc.mute.alert":
                                send "&8[&4MUTE&8] &c%arg 1%&7 has been muted for &c%arg 2%&7." to loop-player
 
I just copied your skript and for me it just works?
So maybe it has to do with some addon your using cuz i am only using half off yours.
0c4f48bfc92b30c5350791b640a2bf56.png
 
I just copied your skript and for me it just works?
So maybe it has to do with some addon your using cuz i am only using half off yours.
0c4f48bfc92b30c5350791b640a2bf56.png
Go onto that account and screenshots the message that it sent to that user.
 
Status
Not open for further replies.