As far as I know, you can't put a flag on an empty vehicle... it has to be given to a unit.
I generally give it to a person, so if I had a UAZ called uaz that I wanted to drive around with the flag I'd use:
flag setflagowner uazd
uazd is the driver of uaz