I want to make a skript that sets players to gamemode spectator if they are not present in a table.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

AQika

Member
Jun 28, 2023
24
2
3
24
on quit:
remove player from {alive::*}
if size of {alive::*} is less than 2:
set {stop} to true
loop {alive::*}:
broadcast "The winner is %loop-value%"
on death:
remove player from {alive::*}
if size of {alive::*} is less than 2:
set {stop} to true
loop {alive::*}:
broadcast "The winner is %loop-value%"

--if player is not in {alive::*}:
-- set player gamemode to spectator
 
you can do that
Code:
on death:
set the gamemode of the victim to spectator 
remove player from {alive::*}
if size of {alive::*} is less than 2:
set {stop} to true
loop {alive::*}:
broadcast "The winner is %loop-value%"
 
  • Like
Reactions: BaeFell