Jump to content

help with mute gui


Windyshop

Recommended Posts

command /tempmute [<offlineplayer>]:
    aliases: /tm
    permission: punish.use
    permission message: &cYou do not have the correct permission to execute this command!
    trigger:
        open virtual chest with size 5 named "&c&lMute" to player
        format gui slot 19 of player with book and quill named "&cMisbehavior" with lore "&7Duration: 12 hours" to run:
            make player execute command "/mute %arg-1% 12h Misbehavior"

 

Hey, I'm tryna make a mute gui but when i use it it mutes "<none>" and not the player i stated in arg-1 how do i fix that?

Link to comment
Share on other sites

I haven't actually tested this, but the problem might be with the command's syntax. If you're always going to use tempmute to mute someone, the 1st argument should not be optional, if that makes any sense.

command /tempmute <offlineplayer>:
	aliases: /tm
	permission: punish.use
	permission message: &cYou do not have the correct permission to execute this command!
	trigger:
		arg 1 is online
  # You can remove the above line if you want to be able to mute offline players, not sure how that works with /mute however.
		open virtual chest with size 5 named "&c&lMute" to player
		format gui slot 19 of player with book and quill named "&cMisbehavior" with lore "&7Duration: 12 hours" to run:
			make player execute command "/mute %arg-1% 12h Misbehavior"

If you're trying to make a custom punishments plugin, you could make your own muting system.

Link to comment
Share on other sites

At the start if the command, do set {_arg} to arg-1. Then instead of %arg-1%, use %{_arg}% in the rest of the skript. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.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...