hey that works, I also just need to add a flag pole anywhere on map with the actual flag. So for people in the future who need to do the same thing here is what u do:
1. make a flag pole anywhere on the map, even in water. name it then assign the flag texture using {nameofunit} setFlagTexture {"flag.jpg"}
2. Create the ubit that will be crew in the empty vehicle. then do the set flag owner command. {nameofpole} setFlagOwner {unitname}, then assign the unit as a crew {unitname} moveInDriver {vehiclename}
3. create an empty vehicle and assign it a name so you can assign crew.