Hello and welcome to e health forum.
Presence of a foul smelling urine and right sided pain could be a indicator of urinary infection.
Pain that originates due to renal issues (Stones, infection) is episodic , spasmodic or colicky in nature, originating in the flank and radiating to the lower belly, inner thigh. It is associated with other symptoms like nausea, vomiting and systemic features due to any infection.
Based on the history, you may be having some foci of infection within the urinary tract, which needs to be evaluated with a ultrasound of the abdomen, urinalysis; a urine culture and antibiotic sensitivity test.
Treatment with antibiotics will be needed, which will clear the infection. In case of urinary stones hospitalization, adequate hydration therapy and pain killers
You might consult with your doctor or a urologist for specific treatment and advice.