function GetPlayers() local n = 0 for i=1,8 do n = n + (GetPlayerState(i) == 1 or 0) end return n end