Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {prefix} = "<Insert what you want here>"
- {p} = "<Insert what you want here>"
- seconds = 10 seconds
- command /startvote <text>:
- usage: /startvote <vote>
- permission: skript.op
- trigger:
- set {yes} to 0
- set {no} to 0
- broadcast "%{p}% %{prefix}% %arg-1% &r&7- &r&6please type &e&l /yes or /no to vote! &dyou have %{seconds}% seconds"
- loop all players:
- set {voted.%loop-player%} to false
- set {vote} to true
- send "&7&m--------------------------------------------"
- send "&cClick one of the following"
- send json of "&7[&aYes&7]" run "/yes" to all players
- send json of "&7[&cNo&7]" run "/no" to all players
- send "&7&m--------------------------------------------"
- wait {seconds}
- set {vote} to false
- broadcast "%{p}%There were %{yes}% votes for Yes. No received %{no}% votes!"
- command /yes:
- usage: /yes - vote yes!
- trigger:
- if {voted.%player%} is true:
- message "%{p}%You have already voted!" to the player
- {vote} is true
- if {voted.%player%} is false:
- set {voted.%player%} to true
- wait 0.1 second
- add 1 to {yes}
- message "%{p}%Vote taken!" to the player
- command /no:
- usage: /no - vote no!
- trigger:
- if {voted.%player%} is true:
- message "%{p}%You have already voted!" to the player
- {vote} is true
- if {voted.%player%} is false:
- set {voted.%player%} to true
- wait 0.1 second
- add 1 to {no}
- message "%{p}%Vote taken!" to the player
Advertisement
Add Comment
Please, Sign In to add comment