I got a BMX bike and i would like to paint the rims to match my frame.I want advice how i should paint it so i don’t end screwing it up.But.So can i get some advice and tips on how to paint the rims of my bike?

I did the exact same thing that you want to do. I took my rims, cranks, stem, both hubs, and my sprocket to my dads Panel Shop, and the spray painter there painted mine for me. Here’s a pic of my bike before and after.
BEFORE: http://i293.photobucket.com/albums/mm74/Canaussies/Macneil3.jpg
AFTER: http://i293.photobucket.com/albums/mm74/Canaussies/NewBikepic.jpg

My dad said he sanded back the parts first, just enough to rough up the surface, to allow the paint to stick. If u just paint right over paint, it will peel off. I used a fine grade sand paper on the rims, sanding down any and every spot of minor rust, bubbling, and flaking of the chrome (I have Odyssey Hazard lites). It took forever, and my hands hurt afterward, with blisters, too, butt the rims were soooo smooth afterwards, the paint job came out awesome. Spend time really working on the prepping of the rims, its worth it in the end. I think it was 320 paper. it will feel like nothing is happening, but it’s slowly taking the imperfections off and out of the rim. The smoother the better.
Take your rim to the a paint shop or a hardware store, and they will recommend what paper to use. There should be a very fine coat of scratches on the rim, visible, but not able to feel them. This finish will make the paint stick hard.
If ur gonna do it urself, prep the rims, then put a primer coat on them. Let it cure (a few hours), then sand it back lightly, with fine grade paper. Put ur first coat of paint on them, a very light coat, and let it dry, (hours, again) then repeat the process with sand paper and paint, untill ur happy with the job, then add a coat or two of clear, to seal the paint and give it a nice finish.

I highly recommend taking them to a Panel Shop, and asking the painter to do them for ya, for some ‘beer money’. lol It will be nothing for him to do ur rims, and car paint has a sealant in it that makes the paint last ages. Just prep them urself, as that’s the most important stage, and will affect the final job.
If u don’t have money to blow, do it urself. I was prepared to pay big $$ coz there are no rims that match the exact colour of my bike, so it’s unique.

Good luck, man. Let us know how it turns out..!!
I would highly recommend