I've had pelvic inflammatory disease (pid) for over 3 years how does this affect fertility? It has already irregulated my period.

unusual. It would be unusual to have pid for 3 years if you are treated. You may certainly have chronic pelvic pain, but pid is an infection, so hopefully you have been treated for this. Please see a gynecologist.
PID. Pid can affect your fallopian tubes and can cause scarring which can reduce fertility. See your doctor. There are tests that can check to see if you fallopian tubes are open.