Lacky
Пользователь
- Сообщения
- 15
первый
и второй
Код:
on load:
loop all players:
add all players to {_players::*}
set {_vote} to 0
set {_size} to size of {_players::*}
set {_box} to a random integer between 9901 and 9908
set {_voteProcent} to {_vote} / {_size} * 100
command /vote <text>:
trigger:
if {_%player%.vote} is false:
if arg 1 is "+":
set {_vote} to {_vote} + 1
set {_%player%.vote} to true
else if {_%player%.vote} is true:
send "Ты уже проголосовал! Не жульничай!" to player
else:
send "используй /vote +" to player
if {_voteProcent} >= 60:
wait 3 seconds
clear inventory of all players
execute console command "givebox {_players::*} {_box}"
set {_vote} to 0
loop {_players::*}:
set {loop-player.vote} to false
и второй
Код:
on load:
set {leaves.%player%} to 3
on death of player:
set {leaves.%victim%} to {leaves.%victim%} -1
message "игрок %victim% умер и у него осталось {leaves.%victim%} жизней" to all players
if {leaves.%victim%} is 0:
set gamemode of {victim} to spectator
message "игрок %victim% истратил все жизни, и больше не сомжет играть с нами.." to all players