hey,
I wanna make it so Moderators will be able to bypass chat cooldown.
here's my code:
I wanna make it so Moderators will be able to bypass chat cooldown.
here's my code:
Code:
command /slowchat [<number>]:
permission: slowchat
permission message: &cYou do not have access to this command.
trigger:
if arg-1 is not set:
send "&cUsage: /slowchat <cooldown in seconds>"
if arg-1 is set:
set {slowchat} to "%arg-1% seconds" parsed as timespan
loop all players:
if loop-player has permission "slowchat":
send "&D[STAFF] &e%player% &6&lhas set the chat cooldown to &e%arg-1% &6&lsecond(s)" to loop-player
send "&aYou've set the chat cooldown to %arg-1% second(s)" to player
on chat:
set {chat} to difference between {chat.%player%} and now
if {chat} is less than {slowchat}:
cancel event
message "&cYou're on chat cooldown &4(&f%{slowchat}%&4)"
stop
set {chat.%player%} to now