I'm having a trouble with my skript. I want to execute command when there is one player left in survival gamemode.
Example: 2 players in survival mode remaining, and the other player kills the other one -> execute command.
I have no clue how to get this to work.
[doublepost=1621870760,1621869852][/doublepost]nvm got it working!
Example: 2 players in survival mode remaining, and the other player kills the other one -> execute command.
I have no clue how to get this to work.
Code:
command /resetointi:
trigger:
set block at location -148, 68, -172 to redstone block
on join:
set {players.online} to number of all players
on death of player:
if {players.online} is less than 2:
make player execute command "/resetointi"
Code:
on join:
set {players.online} to number of all players
on quit:
remove 1 from {players.online}
command /resetointi:
trigger:
set block at location -148, 68, -172 to redstone block
on death of player:
remove 1 from {players.online}
if {players.online} = 1:
make player execute command "/resetointi"