I worked in a nightclub for years and knew a number of people with varying degrees of coke and other class A drug problems and quite a few gained weight with that lifestyle. Coke stops you feeling hungry and speeds up your metabolism but can also cause massive water retention and junk food cravings. And like anything else, it's dependent on the other aspects of your lifestyle. I knew one guy who was on the stuff all the time (he was a DJ) but he was fat as hell because he constantly drank beer and ate sweets and when he had time off the coke, he smoked pot and ate burgers.
Coming down off drugs also causes cravings for junk food like you would not believe. A McDonalds is incredibly attractive to anyone coming down so often people binge eat when they're not taking the drugs and that can cause total havoc to your body. Fortunately for a lot of people who are into this stuff, they drink less when they're out and dance for hours which helps keep them reasonably trim, but anyone with terrible habits and a natural tendency to gain weight will probably find coke is not a great route to weight loss.
Apologies for the essay - I remember being astonished at the state of some of the people I saw coming through the club and over the five years I worked in that area I saw a lot of this kind of thing!