Guest User

Untitled

a guest
May 20th, 2015
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. variables:
  2. {prefix} = "<Insert what you want here>"
  3. {p} = "<Insert what you want here>"
  4. seconds = 10 seconds
  5.  
  6. command /startvote <text>:
  7. usage: /startvote <vote>
  8. permission: skript.op
  9. trigger:
  10. set {yes} to 0
  11. set {no} to 0
  12. broadcast "%{p}% %{prefix}% %arg-1% &r&7- &r&6please type &e&l /yes or /no to vote! &dyou have %{seconds}% seconds"
  13. loop all players:
  14. set {voted.%loop-player%} to false
  15. set {vote} to true
  16. send "&7&m--------------------------------------------"
  17. send "&cClick one of the following"
  18. send json of "&7[&aYes&7]" run "/yes" to all players
  19. send json of "&7[&cNo&7]" run "/no" to all players
  20. send "&7&m--------------------------------------------"
  21. wait {seconds}
  22. set {vote} to false
  23. broadcast "%{p}%There were %{yes}% votes for Yes. No received %{no}% votes!"
  24.  
  25. command /yes:
  26. usage: /yes - vote yes!
  27. trigger:
  28. if {voted.%player%} is true:
  29. message "%{p}%You have already voted!" to the player
  30. {vote} is true
  31. if {voted.%player%} is false:
  32. set {voted.%player%} to true
  33. wait 0.1 second
  34. add 1 to {yes}
  35. message "%{p}%Vote taken!" to the player
  36.  
  37. command /no:
  38. usage: /no - vote no!
  39. trigger:
  40. if {voted.%player%} is true:
  41. message "%{p}%You have already voted!" to the player
  42. {vote} is true
  43. if {voted.%player%} is false:
  44. set {voted.%player%} to true
  45. wait 0.1 second
  46. add 1 to {no}
  47. message "%{p}%Vote taken!" to the player
Advertisement
Add Comment
Please, Sign In to add comment