One scipt to cover all guns

I have been looking at the dastardlybanana fps package and cnt get my head around how his variables change in the gun script when he changes the type of gun he uses. can any one tell me how he does it? i know he uses an enum but how does that change variables accoringly??

The gun script uses a custom editor (which changes what the editor displays), and within that we change which variables display based on the value of the enum. (You can see the editor script under the 'editor' folder, it's called gunscripteditor)

here's some information on extending the editor