on load:
set {glosowanie.tak} to 0
set {glosowanie.nie} to 0
set {glosowanie.all} to 0
if {glosowanie.%player%} is true:
execute console command "lp user %player% permission unset glosowanie.vote"
wait 30 second
execute console command "lp user %player% permission set glosowanie.vote"
command /glosowanie [<text>]:
trigger:
if player has permission "stworz.glosowanie" or "*":
execute console command "chat off"
send "&7» &aGracz &e%player%&a wywołał głosowanie:"
send "&7» &a{@[<text>]}"
send "&7»"
send " <tooltip:&eKliknij tu aby zagłosować na &aTAK!>&6<run command:/glosowanie_tak>[TAK]<reset> <tooltip:&eKliknij tu aby zagłosować na &cNIE!>&9<run command:/glosowanie_nie>[NIE]<reset>" to all players
wait 30 second
send "&8» &7Głosowanie zakończone!"
wait 2 second
if {glosowanie.tak} is smaller than {glosowanie.nie}:
send "&eZagłosowano na &cNIE!"
send "&eLiczba głosów na nie: {glosowanie.nie}"
send "&eLiczba wszystkich głosujących: {glosowanie.all}"
wait 2 second
execute console command "chat on"
else:
send "&eZagłosowano na &aTAK!"
send "&eLiczba głosów na tak: {glosowanie.tak}"
send "&eLiczba wszystkich głosujących: {glosowanie.all}"
wait 2 second
execute console command "chat on"
else:
send "&cBRAK PERMISSI!"
command /glosowanie_tak:
trigger:
if player has permission "glosowanie.vote":
send "&eZagłosowałeś na &a&l&oTAK!"
add 1 to {glosowanie.tak}
add 1 to {glosowanie.all}
set {glosowanie.%player%} to true
else:
send "&cOddałeś już głos!"
command /glosowanie_nie:
trigger:
if player has permission "glosowanie.vote":
send "&eZagłosowałeś na &a&l&oNIE!"
add 1 to {glosowanie.nie}
add 1 to {glosowanie.all}
set {glosowanie.%player%} to true
else:
send "&cOddałeś już głos!"
Nie za bardzo wiem gdzie leży problem, liczę na pomoc.
Pytanie
hbrt 41
Witam!
Mam problem w tym kodzie:
on load: set {glosowanie.tak} to 0 set {glosowanie.nie} to 0 set {glosowanie.all} to 0 if {glosowanie.%player%} is true: execute console command "lp user %player% permission unset glosowanie.vote" wait 30 second execute console command "lp user %player% permission set glosowanie.vote" command /glosowanie [<text>]: trigger: if player has permission "stworz.glosowanie" or "*": execute console command "chat off" send "&7» &aGracz &e%player%&a wywołał głosowanie:" send "&7» &a{@[<text>]}" send "&7»" send " <tooltip:&eKliknij tu aby zagłosować na &aTAK!>&6<run command:/glosowanie_tak>[TAK]<reset> <tooltip:&eKliknij tu aby zagłosować na &cNIE!>&9<run command:/glosowanie_nie>[NIE]<reset>" to all players wait 30 second send "&8» &7Głosowanie zakończone!" wait 2 second if {glosowanie.tak} is smaller than {glosowanie.nie}: send "&eZagłosowano na &cNIE!" send "&eLiczba głosów na nie: {glosowanie.nie}" send "&eLiczba wszystkich głosujących: {glosowanie.all}" wait 2 second execute console command "chat on" else: send "&eZagłosowano na &aTAK!" send "&eLiczba głosów na tak: {glosowanie.tak}" send "&eLiczba wszystkich głosujących: {glosowanie.all}" wait 2 second execute console command "chat on" else: send "&cBRAK PERMISSI!" command /glosowanie_tak: trigger: if player has permission "glosowanie.vote": send "&eZagłosowałeś na &a&l&oTAK!" add 1 to {glosowanie.tak} add 1 to {glosowanie.all} set {glosowanie.%player%} to true else: send "&cOddałeś już głos!" command /glosowanie_nie: trigger: if player has permission "glosowanie.vote": send "&eZagłosowałeś na &a&l&oNIE!" add 1 to {glosowanie.nie} add 1 to {glosowanie.all} set {glosowanie.%player%} to true else: send "&cOddałeś już głos!"Nie za bardzo wiem gdzie leży problem, liczę na pomoc.
Edytowane przez hbrtOdnośnik do komentarza
https://skript.pl/temat/48771-problem-ze-skryptem/Udostępnij na innych stronach
22 odpowiedzi na to pytanie
Rekomendowane odpowiedzi