please help me i want players who have op to bypass this chat cooldown

  • 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 comminuty!

    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.

Geico

New Member
Jan 19, 2021
6
0
1
23
options:
Prefix: &f[&c&lCOOLDOWN&F]
Message: &cPlease wait 5 seconds.
CoolDown: 5 seconds

on chat:
if {%player%.cooldown} is true:
send "{@Prefix} {@Message}"
cancel event
else:
set {%player%.cooldown} to true
wait {@CoolDown}
clear {%player%.cooldown}
 
options:
Prefix: &f[&c&lCOOLDOWN&F]
Message: &cPlease wait 5 seconds.
CoolDown: 5 seconds

on chat:
if {%player%.cooldown} is true:
send "{@Prefix} {@Message}"
cancel event
else:
set {%player%.cooldown} to true
wait {@CoolDown}
clear {%player%.cooldown}
enjoy my script
Code:
command /slowchat [<number>]:
  permission: mod
  trigger:
    if arg-1 is not set:
      send "&eUsage: &3/slowchat &f<duration in seconds or off>"
     
    if arg-1 is set:
      set {slowchat} to "%arg-1% seconds" parsed as timespan
      send "&aYou've set the slowchat mode to &e%arg-1% seconds&a!"
     
on chat:
  if player doesn't have permission "trainee":
    set {schat} to difference between {schat.%player%} and now # s chat represents the number of the slowchat.
    if {schat} is less than {slowchat}:
      cancel event
      send "&cYou're on chat cooldown (&4% {slowchat}%&c)"
      stop
    set {schat.%player%} to now
    stop
 
Last edited:
Hey thanks for the skript but is there any way to make it run 24/7?
thank you so much for this skript though just asking
 
like i dont want it to be a command, and also there is an error, members cant speak because the cooldown just runs infinetly, is there a way you can fix it?
 
like i dont want it to be a command, and also there is an error, members cant speak because the cooldown just runs infinetly, is there a way you can fix it?
you need to first set the slowchat to it
so like /slowchat 2 on my server.
if you want staff not being able to change it (bad idea)
use ONLY this code
Code:
on chat:
  if player doesn't have permission "trainee":
    set {schat} to difference between {schat.%player%} and now # s chat represents the number of the slowchat.
    if {schat} is less than 3 seconds:
      cancel event
      send "&cYou're on chat cooldown (&4% difference between {schat} and 3 seconds%&c)"
      stop
    set {schat.%player%} to now
    stop
 
options:
Prefix: &f[&c&lCOOLDOWN&F]
Message: &cPlease wait 5 seconds.
CoolDown: 5 seconds

on chat:
if {%player%.cooldown} is true:
send "{@Prefix} {@Message}"
cancel event
else:
set {%player%.cooldown} to true
wait {@CoolDown}
clear {%player%.cooldown}

Well with variables you put arguments and stuff after the variable. Like this: {variable.%player%}

also tbh I'm not 100% sure what to do here.
 
Status
Not open for further replies.