You name the mesh part the same name as the texture that you page in the add-on. If you want a certain part to be red, create a red.png in the add-on's folder and color it red. Then, on the mesh, name that part red. I think this is how it works; I personally haven't done it but that's what I've read from tutorials.
Off-Topic: Because we don't have enough gun add-ons :P