Errors on custom game mode?

So, I’ve been exploring how gmod handles custom game modes. I’ve noticed one problem, if I base the game mode from anything but sandbox, I get a ton of errors upon starting a game, because a lot of addons I have are intended for sandbox. I don’t want the game mode to have any sandbox gimmicks, like the spawn/context menu etc. I’m taking this from perspective of a player, anyone trying the game mode would be bound to have some incompatible addons mounted. One idea I had was to automatically unmount any addons that might be incompatible. Though, I have no idea how to do that, I don’t know if GM:Initialize is called before or after the addons are mounted. Maybe I could unmount them from the menu, before the game is loaded, but even then I have no idea how to call lua from the menu. If that doesn’t work, I could just derive the game mode as a sandbox variant, and manually remove sandbox functions. Is there any way I could resolve this?

The reason these errors are occurring is because, yes as you said, they are designed for sandbox.

The reason the errors are being called when you try to play your custom game mode is because you have the addons that require sandbox on the server, so the server is trying to run those. Remove them from the server that the gamemode is hosted on.

Edit: Also GM:Initialize is “Called after the gamemode loads and starts.” (quote from gmod wiki ) which means its called after the addons are mounted.