How long have you had the pain?
How regular are your periods?
Do you have other symptoms, such as fever, bowel symptoms, etc?
Did the pain and smelly discharge begin at the same time? Thank you.
Have you seen a doctor about these symptoms? If so, what has been the diagnosis?
Have you been tested for STD's?
It's unusual to have a smelly vaginal discharge that occurs with abdominal pain.
Most smelly vaginal discharges are due to bacterial vaginosis,(BV), which occurs due to a change in vaginal bacteria. It's not generally related to pelvic infection inside the uterus or tubes, which can cause pelvic pain. BV is easily diagnosed by your practitioner using a microscope. It's treated with certain antibiotics, although it's not an infection.
Pelvic pain that comes and goes may be due to ovarian cysts, pelvic infection, endometriosis, or other conditions. It will require a good history, careful pelvic exam, and perhaps other tests to determine the cause.
So I would recommend seeing your doctor as soon as you can to figure out the cause of your symptoms.
For the smelly discharge, you could try lactobacillus vaginal suppositories, which can help to restore normal vaginal bacteria.
It's hard to know what to do about the pelvic pain until the cause is diagnosed. I would avoid any activity that makes the pain worse.