Hello, Thank you for asking your query at DoctorSpring
From your symptoms of constipation, vomiting, and foul smelling flatulence points out to obstruction in your intestine.
Obstruction can occur due to many reasons, it could be malignancy or benign growth of tissue or healing ulcers fibrosed over time. You will have to go for USG abdomen to confirm the diagnosis. As a conservative measure, avoid taking any solid food, take only liquid food. Stop using laxatives. For pain, take Tylenol. You can also place a warm pad to your abdomen. Avoid taking carbonated drinks or alcohol and also avoid anti inflammatory drinks.
I suggest you visit a surgeon, who will suggest you the surgery required.
Hope this helps. Please feel free to ask follow-up questions.