Quality of the paint is the biggest factor in how long the paint will last, Nissan in the 90's were using very good paint
Other than that, get on top of small issues when you notice them, wash and wax to help keep contaminants from bonding to the surface, as well as washing mud/dirt off quickly...