Find out how much it would cost to repair the car, then figure out the value of the car and subtract the repair cost from the value.
Say the cars worth $4,000 and it's going to cost $1,500 to repair....sell the car for $2,000 (subtract some because it's currently wrecked)