mute

  • 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.

skanto123

Active Member
Jan 8, 2018
70
0
0
34
command /cmute [player] [text]:
permission: cmute.mute
permission message: &cNo Permission!
trigger:
if arg 1 is set:
if arg 2 is set:
if {mute.%player-argument%} is 0:
set {mute.%player-argument%} to 5
if {mute.%player-argument%} is set:
set {mute.%player-argument%} to {mute.%player-argument%} * 2

every 1 seconds:
loop all players:
if {mute.%loop-player%} is set:
make console execute command "mute %loop-player% {mute.%loop-player%} m %text-argument%

What I got done. How do I make it so when staff does /cmute player reason if the player isnt muted it sets the mute to 5 mins and mutes him and if he gets muted again it sets the mute to old mute time * 2. so first its 5mins then 10 min mute then 20min mute
 
Hey
For starters you need to have your variables in chevrons
so instead of putting [player] you need to put [<player>]

As for this part
"%loop-player% {mute.%loop-player%} m %text-argument%"
Im not sure if that works
Try
%loop-player% {mute.%loop-player%} m %arg-2%
[doublepost=1522700596,1522693351][/doublepost]As per our discord conversation, this is the fix for this issue

code_language.skript:
command /cmute [<player>] [<text>]:
    permission: cmute.mute
    permission message: &cNo Permission!
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                if {mute.%arg-1%} is not set:
                    set {mute.%arg-1%.time} to 5
                    set {mute.%arg-1%} to true
                if {mute.%arg-1%} is set:
                    set {mute.%arg-1%.time} to {mute.%arg-1%.time} * 2
                    set {mute.%arg-1%} to true

every 1 seconds:
    loop all players:
        if {mute.%loop-player%} is true:
            make console execute command "mute %loop-player% %{mute.%loop-player%.time}%m"
            set {mute.%loop-player%} to false
 
Status
Not open for further replies.