Jump to content
  • 0

Mute Skript


Maaron

Question

I would like to know how to make a mute skript:

If player's missing a permission like skript.chat, send them a message like "You cannot talk as a muted player."
and then cancel the message.

I would like that whoever helps me out add a /unmute command too.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
command /mute [<offline player>] [<number>]:
	permission: mute.*
	permission message: &cYou do not have permission for that!
	executable by: players and console
	trigger:
		if arg 1 is not set:
			message "&c/mute <player> <seconds>"
		if arg 1 is set:
			set {mute.%arg 1%} to number-argument
			broadcast "&b%arg 1% &6was muted by &c%player%"

every 1 second:
	loop all players:
		if {mute.%loop-player%} is more than 0:
			remove 1 from {mute.%loop-player%}
		else:
			delete {mute.%loop-player%}

on chat:
	if {mute.%player%} is more than 0:
		message "&6You can not talk while you are muted. &b%{mute.%player%}% &cseconds left."
		cancel event
		
every 20 second:
	loop all players:
		if {mute.%loop-player%} is more than 0:
			set action bar of loop-player to "&6You can talk in &b%{mute.%loop-player%}% &cseconds."
			
command /unmute [<offline player>]:
	permission: mute.*
	permission message: &cYou do not have permission for that!
	executable by: players and console
	trigger:
		if arg 1 is not set:
			message "&c/unmute <player>"
		if arg 1 is set:
			delete {mute.%arg 1%}
			broadcast "&b%arg-1% &6was unmuted by &c%player%"

 

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

  • 0
On 8/20/2021 at 3:35 PM, Maaron said:

Can you make that op players cannot be muted?

Sure! Let me get it skripted for ya! This will say that the player is muted when muted, but when the op chats, they will be able to talk

 

command /mute [<offline player>] [<number>]:
	permission: mute.*
	permission message: &cYou do not have permission for that!
	executable by: players and console
	trigger:
		if arg 1 is not set:
			message "&c/mute <player> <seconds>"
		if arg 1 is set:
			set {mute.%arg 1%} to number-argument
			broadcast "&b%arg 1% &6was muted by &c%player%"

every 1 second:
	loop all players:
		if {mute.%loop-player%} is more than 0:
			remove 1 from {mute.%loop-player%}
		else:
			delete {mute.%loop-player%}

on chat:
	if player is op:
		set {NothingLol::%player%} to true
	else:
		if {mute.%player%} is more than 0:
			message "&6You can not talk while you are muted. &b%{mute.%player%}% &cseconds left."
			cancel event
		
every 20 second:
	loop all players:
		if {mute.%loop-player%} is more than 0:
			set action bar of loop-player to "&6You can talk in &b%{mute.%loop-player%}% &cseconds."
			
command /unmute [<offline player>]:
	permission: mute.*
	permission message: &cYou do not have permission for that!
	executable by: players and console
	trigger:
		if arg 1 is not set:
			message "&c/unmute <player>"
		if arg 1 is set:
			delete {mute.%arg 1%}
			broadcast "&b%arg-1% &6was unmuted by &c%player%"

 

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...