GameMode vs GameModeBase

i made a simple game that allows players to host or join a match
inside the match the host decides when to start the game, after that zombies and loot start spawning on the floor

i want to allow players to join a match only before it starts,so i was reading the documentation and found that “AGameMode is more suited to standard game types like multiplayer shooters due to its implementation of the concept of match state”

is AGameMode a most suitable option for my type of game? and if so how do stop players from joining once the game begins?

GameModeBase haves a function called “PreLogin”, does GameMode also inherit this function?

i could only find OnPostLogin and not OnPreLogin

Yes GameMode inherits GameModeBase, recently some higher code been separated from GameMode just in case you don’t need those extra features creating GameModeBase. Looking on API refrence should give you idea what GameMode contains and what it overrides

PreLogin is in GameModeBase but is not binded to blueprint

so i need to write c++ to execute code inside this function?

to expand this: i want to have a boolean variable in my gamemode and only allow players to connect if this boolean is true.

I found in the documentation that PreLogin is executed while the client is trying to connect to the server but i cant acces this function from the GameMode BP, i can only see the OnPostLogin function.

i guess i can check the value of the boolean on the OnPostLogin function but i would like to do it before they even connect, can i do this with BP or do i need a c++ class?

Yes, or just call blueprint implementable event in that function in C++ to forward it to blueprints