Three rules to get you started off:
1. Know your minor scales very well
2. Listen, listen, LISTEN, ... to every bit of jazz you can get you hands on!
3. Record yourself and listen to how what you are playing matches up with the chord proggressions that are going on in the background.
Then finally a suggestion. See if you can find some of that music that has the solo and lead parts removed from the recording and practice with it. If somebody knows the proper name for it, please post it. I can't remember.