How do i make custom GameState work?

I added a custom GameState class that overrides the AGameState class.
I just added the following code:

 ATanksGameState::ATanksGameState()
    {
    }

void ATanksGameState::HandleBeginPlay()
{
	Super::HandleBeginPlay();
	GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Green, FString::Printf(TEXT("state begin play")));
}

The message is printed when i start the game, but i don’t possess any player anymore or anything. Basically nothing works anymore. Do i have to change something related to the gamemode class or something else?

I still have the default gamemode class, that inherits gamemodebase, and added no code to it.

Any help is appreciated.

When you use GameMode Base you have to use GameState Base and when you use GameMode you need to use GameState. They go hand in hand.