Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Skript by Fleft! - Hope you enjoy!
- variables:
- {prefix} = "&7[&eVote&7]&9"
- command /startvote <text>:
- usage: /startvote <vote>
- permission: skript.op
- trigger:
- set {voteyes} to 0
- set {voteno} to 0
- broadcast "%{prefix}% %arg-1% &r&7-&r&9&l /yes or /no"
- loop all players:
- set {hasvoted.%loop-player%} to false
- set {vote} to true
- wait 15 seconds
- set {vote} to false
- broadcast "%{prefix}% There were %{voteyes}% votes for Yes. No received %{voteno}% votes!"
- command /yes:
- usage: /yes - vote yes!
- trigger:
- if {hasvoted.%player%} is true:
- message "%{prefix}% You have already voted!" to the player
- {vote} is true
- if {hasvoted.%player%} is false:
- set {hasvoted.%player%} to true
- wait 0.1 second
- add 1 to {voteyes}
- message "%{prefix}% Vote taken!" to the player
- command /no:
- usage: /no - vote no!
- trigger:
- if {hasvoted.%player%} is true:
- message "&7&l[&r&9Vote&r&7&l]&r &eYou have already voted!" to the player
- {vote} is true
- if {hasvoted.%player%} is false:
- set {hasvoted.%player%} to true
- wait 0.1 second
- add 1 to {voteno}
- message "%{prefix}% Vote taken!" to the player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement