My question involves criminal law for the state of:

This all happened in the State of New Jersey. After work one night I drove a co-worker to his house and we were sitting in the parking lot to his apartment development, he was about to light up marijuana and we were there for about 10 min. I never got to take a hit when cops rolled up on us. Apparently there was a "suspicious vehicle" call made. We believe it wasnt even for us and we were the ones who were there because we saw a silver car in the parking lot that left when they saw us there. So, anyway, the cops came up to my window and told us about the call, and asked if we had drugs, first I said no, and Im not all too sure if marijuana was in plain sight but he deff. smelled it as it was just lit then put out before I got to hit it, my friend did though so there was deff. an odor. My friend, trying to save me in anyway he could, gave up all his maijuana and he had prescription pain pills. I was charged with possession of marijuana under 50 grams (disorderly person charge), Possession of a prescription not obtained by legal practitioner (forgive spelling) or legal prescription (this was a disorderly persons charge as well as a 3rd degree criminal offense, 10 oxycodone). My question is, if my friend says in court that everything was his and I didnt know about the pills if the charges will get dropped. The misdmeanors im not all that worried about, but the other one I am. Will all charges be dropped for me if he says everything was his? Im asking because I had planned on joining the coast guard and I wont be able to if the charges stick, finacially I cant affor a lawyer that has a flat fee, I consulted one and with the story I told him (to my recolection, everything that happened when searched an arrested) and he said theres a possibility of an illegal search and seizure but he, nor I, have seen the police report since this only happened on tues. its now friday night. If he pleads guilty and says the drugs are all his should I plead not guilty? What should I do? Will the chages be dropped for me? Please someone help me. Thankyou. Also, if a lawyer that works with the Monmouth County courts that accpets payment plans but only has a flat fee, no hourly charge, sees this please let me know as im limited finacially and need a lawyer for this serious charge of the pills. Again, thank you.

Oh and I forgot to mention that as far as the cops know, I told them that they pills werent mine and that there was this sketchy kid in the back seat earlier (6 were found in the pouch behind my seat, 4 directly on my friends person but he gave em all up) and I didnt know they were there and that since it was my car I had no choice but to be responsible, so if my friend says he put them there, the story would co-oberate. With the marijuana though, Im pretty sure it was stated that I knew he had some weed, but in reality I honestly did not know he had more weed then what he rolled up and I never even got to smoke anyway.