1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Votekick Skript not working (stopvote command)

Discussion in 'Skript' started by MomoHD, Nov 23, 2019.

Thread Status:
Not open for further replies.
  1. MomoHD

    MomoHD Member

    Joined:
    Nov 23, 2019
    Messages:
    18
    Likes Received:
    0
    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

     

    Attached Files:

  2. Best Answer:
    Post #7 by malia, Nov 24, 2019
  3. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    34
    Likes Received:
    1
    The best way to fix this is to change the colons in the varibles to just a dot that should fix it
     
    MomoHD likes this.
  4. MomoHD

    MomoHD Member

    Joined:
    Nov 23, 2019
    Messages:
    18
    Likes Received:
    0
    i dont know ho to edit the colons
     
  5. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    34
    Likes Received:
    1
    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
     
  6. MomoHD

    MomoHD Member

    Joined:
    Nov 23, 2019
    Messages:
    18
    Likes Received:
    0
    Thank you, I will test it now
    --- Double Post Merged, Nov 23, 2019, Original Post Date: Nov 23, 2019 ---
    It does not work :emoji_disappointed_relieved:

    I'm getting a lot more mistakes now

    Code (Text):
    1. [00:52:29] [main/INFO]: [CHAT] [Skript] Reloading ULX.sk...
    2. [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:')
    3. [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:')
    4. [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":')
    5. [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":')
    6. [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:')
    7. [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":')
    8. [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":')
    9. [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:')
    10. [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:')
    11. [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":')
    12. [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":')
    13. [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:')
    14. [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":')
    15. [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":')
    16. [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:')
    17. [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":')
    18. [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":')
    19. [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:')
    20. [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":')
    21. [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":')
    22. [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:')
    23. [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:')
    24. [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:')
    25. [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:')
    26. [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:')
    27. [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:')
    28. [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:')
    29. [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:')
    30. [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:')
    31. [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:')
    32. [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:')
    33. [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:')
    34. [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}:')
    35. [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}:')
    36. [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}:')
    37. [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:')
    38. [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')
    39. [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')
    40. [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.*}')
    41. [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.*}')
    42. [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%":')
    43. [00:52:30] [main/INFO]: [CHAT] 'else' has to be placed just after an 'if' or 'else if' section (ULX.sk, line 612: else:')
    44. [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%":')
    45. [00:52:30] [main/INFO]: [CHAT] 'else' has to be placed just after an 'if' or 'else if' section (ULX.sk, line 624: else:')
    46. [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.*}')
    47. [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.*}')
    48. [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')
    49. [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.*}')
    50. [00:52:30] [main/INFO]: [CHAT] [Skript] Encountered 12 errors while reloading ULX.sk!
    --- Double Post Merged, Nov 23, 2019 ---
    This is what my script looks like now


    Code (Text):
    1. command /vkYes:
    2.     trigger:
    3.         if {VK.Start} is false:
    4.             send "&8» &7There is not a vote in &aprogress" to player
    5.         if {VK.Start} is true:
    6.             if "%{VK.Voted.*}%" contains "%player%":
    7.                 send "&8» &7you have already voted" to player
    8.             else:
    9.                 add 1 to {VK.Yes-Counter}
    10.                 send "&8» &7You voted for &ayes" to player
    11.                 add player's name to {VK.Voted.*}      
    12.  
    13. command /vkNo:
    14.     trigger:
    15.         if {VK.Start} is false:
    16.             send "&8» &7There is not a vote in &aprogress" to player
    17.         if {VK.Start} is true:
    18.             if "%{VK.Voted.*}%" contains "%player%":
    19.                 send "&8» &7you have already voted" to player
    20.             else:
    21.                 add 1 to {VK.No-Counter}
    22.                 send "&8» &7You voted for &cno" to player
    23.                 add player's name to {VK.Voted.*}
    24.  
    25. command /vote [<text>]:
    26.     permission: ulx.vote
    27.     permission message: {@noperms}
    28.     trigger:
    29.         if arg 1 is not set:
    30.             send "&6Usage: vote - Starts a public kick vote against target. (say: /vote)"
    31.             stop      
    32.         else:
    33.             set {VK.Start} to true
    34.             set {VK.Player} to player
    35.             set {VK.Yes-Counter} to 0
    36.             set {VK.No-Counter} to 0
    37.             broadcast ""
    38.             broadcast "&8» &9%{VK.Player}% &7has started a vote"
    39.             broadcast "&8» &7You can vote with:"
    40.             broadcast "&8"
    41.             json("%player%", "&2/vkYes &7for &aYes||cmd:/vkYes||ttp:&7Click here to Vote for &aYes")
    42.             broadcast "&8"
    43.             json("%player%", "&4/vkNo &7for &cNo||cmd:/vkNo||ttp:&7Click here to Vote for &cNo")
    44.             broadcast "&8"
    45.             broadcast "&8» &e&l%arg-1%&e&l?"
    46.             broadcast "&8» &7you have &c20 &7seconds to vote."
    47.             broadcast "&8"
    48.             loop all players:
    49.                 set {VK.%loop-player%.voted} to false
    50.             wait 20 seconds
    51.             if {VK.Yes-Counter} is greater than {VK.No-Counter}:
    52.             broadcast "&7"
    53.             broadcast "&bVote results"
    54.             broadcast ""
    55.             broadcast "&aYes &8» &2%{VK.Yes-Counter}%"
    56.             broadcast "&cNo &8» &4%{VK.No-Counter}%"
    57.             broadcast ""
    58.             broadcast "&aThe vote was successful"
    59.             broadcast ""
    60.             delete {VK.Yes-Counter}
    61.             delete {VK.No-Counter}
    62.             delete {VK.Start}
    63.             delete {VK.Voted.*}
    64.             delete {VK.Player}
    65.             stop
    66.             if {VK.No-Counter} is greater than {VK.Yes-Counter}:              
    67.             broadcast "&7"
    68.             broadcast "&bVote results"
    69.             broadcast ""
    70.             broadcast "&aYes &8» &2%{VK.Yes-Counter}%"
    71.             broadcast "&cNo &8» &4%{VK.No-Counter}%"
    72.             broadcast ""
    73.             broadcast "&cThe vote was unsuccessful"
    74.             broadcast ""
    75.             delete {VK.Yes-Counter}
    76.             delete {VK.No-Counter}
    77.             delete {VK.Start}
    78.             delete {VK.Voted.*}
    79.             delete {VK.Player}
    80.             stop
    81.                
    82. command /stopvote:
    83.     permission: ulx.stopvote
    84.     permission message: {@noperms}
    85.     description: &7Stops a vote in progress.
    86.     trigger:
    87.         send "&5You &bstopped the current vote." to player
    88.         broadcast "&3(Someone) &bstopped the current vote."
    89.         loop all players:
    90.         set {VK.%loop-player%.voted} to false
    91.         set {VK.Start} to false
    92.         set {VK.Yes-Counter} to 0
    93.         set {VK.No-Counter} to 0
    94.         delete {VK.Yes-Counter}
    95.         delete {VK.No-Counter}
    96.         delete {VK.Start}
    97.         delete {VK.Voted.*}
    98.         delete {VK.Player}
    99.         stop
     
  7. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    34
    Likes Received:
    1
    That's weird.
     
  8. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Code (Skript):
    1. if {VK::Start} is false:
    2.     stop
    Line 51-52
     
    bigboybigboi and MomoHD like this.
  9. MomoHD

    MomoHD Member

    Joined:
    Nov 23, 2019
    Messages:
    18
    Likes Received:
    0
    Thank you malia, I will test it now
    --- Double Post Merged, Nov 24, 2019, Original Post Date: Nov 24, 2019 ---
    Thank youuuuuuuuu Malia, it works!
     
  10. bigboybigboi

    bigboybigboi New Member

    Joined:
    Nov 26, 2019
    Messages:
    8
    Likes Received:
    0
    uh I tried it it... doesnt work
    lmao
     
Thread Status:
Not open for further replies.

Share This Page

Loading...