public synchronized byte[] getOutGoingCommand(long frame, GameServerOutputThread gsot){
		while(outComs.size() == 0 || register.get(gsot)){
			try {
				wait();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		byte[] coms = new byte[1*players + 8];
		byte[] frameBytes = ByteBuffer.allocate(8).putLong(frame).array();
		
		for(int i = 0; i < 8; ++i){
			coms[i] = frameBytes[i];
		}
		Byte[] b = null;
		
		b = outComs.get(frame);
		register.put(gsot, true);
		if(allRegTrue()){
			outComs.remove(frame);
			setAllReg(false);
		}
		if(b == null){
			b = new Byte[players];
			for(int i = 0; i < players; i++){
				b[i] = 0;
			}
		}

		for(int i = 0; i < players; ++i){
			coms[8+i] = b[i];
		}
		
		return coms;
	}