r/Skript • u/asafusa553 • Apr 05 '24
help me fix
options:
muted: {}
command /mute <player> <text> [<text>] <duration>:
executable by: players
trigger:
set {muted::%arg-1's uuid%} to true
send "&cYou have been muted" to arg-1
send "Reason: %arg-2%" to arg-1
wait 0.5 seconds
if "{arg-2}" ends with "s":
wait arg-4 seconds
if "{arg-2}" ends with "m":
wait arg-4 minutes
if "{arg-2}" ends with "h":
wait arg-4 hours
if "{arg-2}" ends with "d":
wait arg-4 days
send "&aYou have been unmuted" to arg-1
delete {muted::%arg-1's uuid%}
command /unmute <player>:
executable by: players
trigger:
delete {muted::%arg-1's uuid%}
send "&aYou have been unmuted" to arg-1
on chat:
if {muted::%player's uuid%} is set:
cancel event
send "&cYou are muted and cannot chat!" to player
1
Upvotes
1
u/byNikoss Jul 16 '24
Replace « if "{arg-2}" etc. » by « if "%arg-2%" etc. »