Custom classified fields assigned to categories

I really need to be able to assign custom field types to certain categories.
For example the car category to show only car related custom fields(ex. CC, horsepower,etc)
In both create ad form and view add.
I'm a programmer so editing .php files won't be a problem if needed.
Create add view

Thank you for your time.