How to set up flag capturing?

Hey guys.
I am building an RTS game and i want to build it like company of heroes. But how do i add the flag capturing element.