Solved Votekick Skript not working (stopvote command)

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

MomoHD

Member
Nov 23, 2019
18
0
1
26
Hi everybody, I'm so bored and that's why I decided to script the ULX Admin Mod (from the game Garry's Mod, and the makers Team Uselyss), I've finally arrived at the end. Unfortunately, the Stopvote Command does not work for me, it comes the message that the vote was stopped. The end message of the vote still comes in the chat. But why??

Please help me quickly
 

Attachments

  • Vote.sk
    3 KB · Views: 270
  • Unbenannt.PNG
    Unbenannt.PNG
    110.6 KB · Views: 244
Here is the code with the colons turned into dots, tell me if it works


command /vkYes:
trigger:
if {VK.Start} is false:
send "&8» &7There is not a vote in &aprogress" to player
if {VK.Start} is true:
if "%{VK.Voted.*}%" contains "%player%":
send "&8» &7you have already voted" to player
else:
add 1 to {VK.Yes-Counter}
send "&8» &7You voted for &ayes" to player
add player's name to {VK.Voted.*}

command /vkNo:
trigger:
if {VK.Start} is false:
send "&8» &7There is not a vote in &aprogress" to player
if {VK.Start} is true:
if "%{VK.Voted.*}%" contains "%player%":
send "&8» &7you have already voted" to player
else:
add 1 to {VK.No-Counter}
send "&8» &7You voted for &cno" to player
add player's name to {VK.Voted.*}

command /vote [<text>]:
permission: ulx.vote
permission message: {@noperms}
trigger:
if arg 1 is not set:
send "&6Usage: vote - Starts a public kick vote against target. (say: /vote)"
stop
else:
set {VK.Start} to true
set {VK.Player} to player
set {VK.Yes-Counter} to 0
set {VK.No-Counter} to 0
broadcast ""
broadcast "&8» &9%{VK.Player}% &7has started a vote"
broadcast "&8» &7You can vote with:"
broadcast "&8"
json("%player%", "&2/vkYes &7for &aYes||cmd:/vkYes||ttp:&7Click here to Vote for &aYes")
broadcast "&8"
json("%player%", "&4/vkNo &7for &cNo||cmd:/vkNo||ttp:&7Click here to Vote for &cNo")
broadcast "&8"
broadcast "&8» &e&l%arg-1%&e&l?"
broadcast "&8» &7you have &c20 &7seconds to vote."
broadcast "&8"
loop all players:
set {VK.%loop-player%.voted} to false
wait 20 seconds
if {VK.Yes-Counter} is greater than {VK.No-Counter}:
broadcast "&7"
broadcast "&bVote results"
broadcast ""
broadcast "&aYes &8» &2%{VK.Yes-Counter}%"
broadcast "&cNo &8» &4%{VK.No-Counter}%"
broadcast ""
broadcast "&aThe vote was successful"
broadcast ""
delete {VK.Yes-Counter}
delete {VK.No-Counter}
delete {VK.Start}
delete {VK.Voted.*}
delete {VK.Player}
stop
if {VK.No-Counter} is greater than {VK.Yes-Counter}:
broadcast "&7"
broadcast "&bVote results"
broadcast ""
broadcast "&aYes &8» &2%{VK.Yes-Counter}%"
broadcast "&cNo &8» &4%{VK.No-Counter}%"
broadcast ""
broadcast "&cThe vote was unsuccessful"
broadcast ""
delete {VK.Yes-Counter}
delete {VK.No-Counter}
delete {VK.Start}
delete {VK.Voted.*}
delete {VK.Player}
stop

command /stopvote:
permission: ulx.stopvote
permission message: {@noperms}
description: &7Stops a vote in progress.
trigger:
send "&5You &bstopped the current vote." to player
broadcast "&3(Someone) &bstopped the current vote."
loop all players:
set {VK.%loop-player%.voted} to false
set {VK.Start} to false
set {VK.Yes-Counter} to 0
set {VK.No-Counter} to 0
delete {VK.Yes-Counter}
delete {VK.No-Counter}
delete {VK.Start}
delete {VK.Voted.*}
delete {VK.Player}
stop
 
Thank you, I will test it now
[doublepost=1574553272,1574552731][/doublepost]It does not work :emoji_disappointed_relieved:

I'm getting a lot more mistakes now

Code:
[00:52:29] [main/INFO]: [CHAT] [Skript] Reloading ULX.sk...
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 58: if arg 1 is online:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 59: if {muted.%arg 1%} is false:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 66: if player has permission "-ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 68: if loop-player has permission "ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 73: if {muted.%arg 1%} is true:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 78: if player has permission "-ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 80: if loop-player has permission "ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 96: if arg 1 is online:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 97: if {muted.%arg 1%} is true:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 104: if player has permission "-ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 106: if loop-player has permission "ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 111: if {muted.%arg 1%} is true:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 116: if player has permission "-ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 118: if loop-player has permission "ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 148: if {cloak.%player%} is false:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 156: if player has permission "-ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 158: if loop-player has permission "ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 174: if {cloak.%player%} is true:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 182: if player has permission "-ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 184: if loop-player has permission "ulx.someone":')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 207: if arg 1 is not set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 210: if arg 1 is set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 220: if arg 1 is not set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 223: if arg 1 is set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 393: if arg 1 is set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 405: if arg 1 is set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 415: if arg 1 is not set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 419: if arg 1 is set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 437: if arg 1 is set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 477: if arg-1 is player:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 484: if arg 1 is not set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 489: if arg 1 is set:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 589: if {VK.No-Counter} is greater than {VK.Yes-Counter}:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 655: if {VK.Yes-Counter} is greater than {VK.No-Counter}:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 670: if {VK.No-Counter} is greater than {VK.Yes-Counter}:')
[00:52:29] [main/INFO]: [CHAT] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (ULX.sk, line 693: loop all players:')
[00:52:30] [main/INFO]: [CHAT] Can't understand this condition/effect: kick arg-1 due to "&6Usage: kick <player> [{reason}] - Kicks target. (say: /kick)" to arg 1 (ULX.sk, line 473: kick arg-1 due to "&6Usage: kick <player> [{reason}] - Kicks target. (say: /kick)" to arg 1')
[00:52:30] [main/INFO]: [CHAT] Can't understand this condition/effect: kick arg-1 due to "&fKicked by &f%player% &f- &f%arg-2%" to arg 1 (ULX.sk, line 476: kick arg-1 due to "&fKicked by &f%player% &f- &f%arg-2%" to arg 1')
[00:52:30] [main/INFO]: [CHAT] A variable's name must not contain any asterisks except at the end after '::' to denote a list variable, e.g. {variable::*} (error in variable {VK.Voted.*}) (ULX.sk, line 586: delete {VK.Voted.*}')
[00:52:30] [main/INFO]: [CHAT] A variable's name must not contain any asterisks except at the end after '::' to denote a list variable, e.g. {variable::*} (error in variable {VK.Voted.*}) (ULX.sk, line 601: delete {VK.Voted.*}')
[00:52:30] [main/INFO]: [CHAT] A variable's name must not contain any asterisks except at the end after '::' to denote a list variable, e.g. {variable::*} (error in variable {VK.Voted.*}) (ULX.sk, line 610: if "%{VK.Voted.*}%" contains "%player%":')
[00:52:30] [main/INFO]: [CHAT] 'else' has to be placed just after an 'if' or 'else if' section (ULX.sk, line 612: else:')
[00:52:30] [main/INFO]: [CHAT] A variable's name must not contain any asterisks except at the end after '::' to denote a list variable, e.g. {variable::*} (error in variable {VK.Voted.*}) (ULX.sk, line 622: if "%{VK.Voted.*}%" contains "%player%":')
[00:52:30] [main/INFO]: [CHAT] 'else' has to be placed just after an 'if' or 'else if' section (ULX.sk, line 624: else:')
[00:52:30] [main/INFO]: [CHAT] A variable's name must not contain any asterisks except at the end after '::' to denote a list variable, e.g. {variable::*} (error in variable {VK.Voted.*}) (ULX.sk, line 667: delete {VK.Voted.*}')
[00:52:30] [main/INFO]: [CHAT] A variable's name must not contain any asterisks except at the end after '::' to denote a list variable, e.g. {variable::*} (error in variable {VK.Voted.*}) (ULX.sk, line 682: delete {VK.Voted.*}')
[00:52:30] [main/INFO]: [CHAT] There's no loop that matches 'loop-player' (ULX.sk, line 694: set {VK.%loop-player%.voted} to false')
[00:52:30] [main/INFO]: [CHAT] A variable's name must not contain any asterisks except at the end after '::' to denote a list variable, e.g. {variable::*} (error in variable {VK.Voted.*}) (ULX.sk, line 701: delete {VK.Voted.*}')
[00:52:30] [main/INFO]: [CHAT] [Skript] Encountered 12 errors while reloading ULX.sk!
[doublepost=1574553358][/doublepost]This is what my script looks like now


Code:
command /vkYes:
    trigger:
        if {VK.Start} is false:
            send "&8» &7There is not a vote in &aprogress" to player
        if {VK.Start} is true:
            if "%{VK.Voted.*}%" contains "%player%":
                send "&8» &7you have already voted" to player
            else:
                add 1 to {VK.Yes-Counter}
                send "&8» &7You voted for &ayes" to player
                add player's name to {VK.Voted.*}       

command /vkNo:
    trigger:
        if {VK.Start} is false:
            send "&8» &7There is not a vote in &aprogress" to player
        if {VK.Start} is true:
            if "%{VK.Voted.*}%" contains "%player%":
                send "&8» &7you have already voted" to player
            else:
                add 1 to {VK.No-Counter}
                send "&8» &7You voted for &cno" to player
                add player's name to {VK.Voted.*}

command /vote [<text>]:
    permission: ulx.vote
    permission message: {@noperms}
    trigger:
        if arg 1 is not set:
            send "&6Usage: vote - Starts a public kick vote against target. (say: /vote)"
            stop       
        else:
            set {VK.Start} to true
            set {VK.Player} to player
            set {VK.Yes-Counter} to 0
            set {VK.No-Counter} to 0
            broadcast ""
            broadcast "&8» &9%{VK.Player}% &7has started a vote"
            broadcast "&8» &7You can vote with:"
            broadcast "&8"
            json("%player%", "&2/vkYes &7for &aYes||cmd:/vkYes||ttp:&7Click here to Vote for &aYes")
            broadcast "&8"
            json("%player%", "&4/vkNo &7for &cNo||cmd:/vkNo||ttp:&7Click here to Vote for &cNo")
            broadcast "&8"
            broadcast "&8» &e&l%arg-1%&e&l?"
            broadcast "&8» &7you have &c20 &7seconds to vote."
            broadcast "&8"
            loop all players:
                set {VK.%loop-player%.voted} to false
            wait 20 seconds
            if {VK.Yes-Counter} is greater than {VK.No-Counter}:
            broadcast "&7"
            broadcast "&bVote results"
            broadcast ""
            broadcast "&aYes &8» &2%{VK.Yes-Counter}%"
            broadcast "&cNo &8» &4%{VK.No-Counter}%"
            broadcast ""
            broadcast "&aThe vote was successful"
            broadcast ""
            delete {VK.Yes-Counter}
            delete {VK.No-Counter}
            delete {VK.Start}
            delete {VK.Voted.*}
            delete {VK.Player}
            stop
            if {VK.No-Counter} is greater than {VK.Yes-Counter}:               
            broadcast "&7"
            broadcast "&bVote results"
            broadcast ""
            broadcast "&aYes &8» &2%{VK.Yes-Counter}%"
            broadcast "&cNo &8» &4%{VK.No-Counter}%"
            broadcast ""
            broadcast "&cThe vote was unsuccessful"
            broadcast ""
            delete {VK.Yes-Counter}
            delete {VK.No-Counter}
            delete {VK.Start}
            delete {VK.Voted.*}
            delete {VK.Player}
            stop
                
command /stopvote:
    permission: ulx.stopvote
    permission message: {@noperms}
    description: &7Stops a vote in progress.
    trigger:
        send "&5You &bstopped the current vote." to player
        broadcast "&3(Someone) &bstopped the current vote."
        loop all players:
        set {VK.%loop-player%.voted} to false
        set {VK.Start} to false
        set {VK.Yes-Counter} to 0
        set {VK.No-Counter} to 0
        delete {VK.Yes-Counter}
        delete {VK.No-Counter}
        delete {VK.Start}
        delete {VK.Voted.*}
        delete {VK.Player}
        stop
 
Thank you malia, I will test it now
[doublepost=1574600132,1574599561][/doublepost]Thank youuuuuuuuu Malia, it works!
 
Status
Not open for further replies.