Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # EliteVote #
- options: # KONFIGURACJA SKRYPTU
- # Nazwa głosowania
- name of vote: "Czy lubisz MPCForum?"
- # Opcje głosowania
- opt1: "tak"
- opt2: "nie"
- # Automatyczne glosowanie
- automatically: "" # Ustaw "yes" jezeli chcesz ustawic na tak
- time: 5 minutes # Czas automatycznego glosowania oraz czas glosowania
- # Glosowanie - Opcje ogolne
- messageVote: "&3Glosowanie rozpoczyna sie!"
- messageVote2: "{@name of vote}"
- vote: "&aDziekujemy za oddanie glosu wyniki po zakonczeniu glosowania!"
- errVoted: "&cGlosowales juz! Nie mozesz oddac dwóch glosów"
- # Wiadomosc po zakonczeniu glosowania
- line1: "&4Glosowanie: &cZakonczono glosowanie!"
- line2: "&a&lTAK: &6%{vote::yes}%"
- line3: "&c&lNIE: &6%{vote::no}%"
- line4: "&6OGOLNYCH: &7%{vote::general}%"
- # Ok! Let's get to the code!
- method "vote" {}:
- set {vote} to true
- clear {vote::yes}
- clear {vote::no}
- clear {vote::general}
- broadcast {@messageVote}
- broadcast {@messageVote2}
- wait {@time}
- set {vote} to false
- broadcast {@line1}
- broadcast {@line2}
- broadcast {@line3}
- broadcast {@line4}
- clear {vote::yes}
- clear {vote::no}
- clear {vote::general}
- method "voteYes" {player}:
- set {_p} to arg{1};
- if {vote::%{_p}%} is false:
- add 1 to {vote::yes}
- add 1 to {vote::general}
- set {vote::%{_p}%} to true
- send {@vote} to {_p}
- stop
- else:
- send {@errVoted} to {_p}
- stop
- method "voteNo" {}:
- set {_p} to arg{1};
- if {vote::%{_p}%} is false:
- add 1 to {vote::no}
- add 1 to {vote::general}
- set {vote::%{_p}%} to true
- send {@vote} to {_p}
- stop
- else:
- send {@errVoted} to {_p}
- stop
- every {@everyAutoTime}:
- set {automatically} to {@automatically}
- {automatically} is "yes":
- function "vote" {name};
- command /vote [<text>]:
- trigger:
- argument 1 is "tak" or "yes":
- function "voteYes" {player};
- argument 1 is "nie" or "no":
- function "voteNo" {player};
- argument 1 is "start":
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement