The above is good advice. I have also fantasized about building a dynamometer type device that I could put the back wheels of an automobile on for some temp power (re-charge, run on low sun or low wind days). The logic goes that I would want to keep fuel for the truck and/or generator anyway. If I had a contraption that would allow me to park a vehicle with the back wheels on a bearing or suspended with a belt attached, leave it in drive and have the wheels turn an electric generator, it would actually be relatively efficient and potentially produce way more power than you would likely need. Storing that power could get expensive.
This is only a hair-brained idea based on how efficient automobile motors have become when considering the HP/torque they put out.
I would expect it to be 3 to 10 times less efficient than a properly sized generator running on the same gasoline. You are not going to be anywhere near the peak efficiency operating points in your vehicle to the load of the generator.