added function to save lockstate of an vehicle