Heat the vegetable oil in a saute pan. Add the onions and cook until tender and golden brown. Add the ham, scrambled eggs, green peas and carrots. Add the cold cooked rice and bean sprouts. Heat the rice mixture thoroughly and season with salt, black pepper and soy sauce.