Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. #Skript by Fleft! - Hope you enjoy!
  2.  
  3.  
  4. variables:
  5. {prefix} = "&7[&eVote&7]&9"
  6.  
  7.  
  8. command /startvote <text>:
  9. usage: /startvote <vote>
  10. permission: skript.op
  11. trigger:
  12. set {voteyes} to 0
  13. set {voteno} to 0
  14. broadcast "%{prefix}% %arg-1% &r&7-&r&9&l /yes or /no"
  15. loop all players:
  16. set {hasvoted.%loop-player%} to false
  17. set {vote} to true
  18. wait 15 seconds
  19. set {vote} to false
  20. broadcast "%{prefix}% There were %{voteyes}% votes for Yes. No received %{voteno}% votes!"
  21.  
  22.  
  23.  
  24.  
  25. command /yes:
  26. usage: /yes - vote yes!
  27. trigger:
  28. if {hasvoted.%player%} is true:
  29. message "%{prefix}% You have already voted!" to the player
  30. {vote} is true
  31. if {hasvoted.%player%} is false:
  32. set {hasvoted.%player%} to true
  33. wait 0.1 second
  34. add 1 to {voteyes}
  35. message "%{prefix}% Vote taken!" to the player
  36.  
  37.  
  38. command /no:
  39. usage: /no - vote no!
  40. trigger:
  41. if {hasvoted.%player%} is true:
  42. message "&7&l[&r&9Vote&r&7&l]&r &eYou have already voted!" to the player
  43. {vote} is true
  44. if {hasvoted.%player%} is false:
  45. set {hasvoted.%player%} to true
  46. wait 0.1 second
  47. add 1 to {voteno}
  48. message "%{prefix}% Vote taken!" to the player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement