Help with multiple gamemodes

So I want to make my gmod server have both prop hunt and hide and seek. And at the end of each map people can vote on the game mode and map to play. I believe this is possible, I just can’t find anywhere to begin to do it. All I ask is for a link to a guide or someone to give me a quick run through and I can figure it out myself after that.

I appreciate any and all help.

Define how many rounds are played per map, initialize a variable that increments on round ends. On round end, check if the counter is equal to the limit, if so, send a net message to all players to open their voting menu. The vote menu then networks with the server, this part will differ with whatever functionality you add, at the end of the vote, change map and reset the counter.

And since I want to do this on both game modes I would put that code into both the game mode’s say init.lua file?

Yes, however the derma would go clientside obviously.

ok thank you

Ok so I have both the gamemodes in the folder, and both are fretta compatible and actually have the same votemap feature. Yet I just cannot understand how to make it so people have to vote for the gamemode before the map. I am not worried which maps are picked because ph and hns are both very similar gamemodes.

[editline]30th April 2015[/editline]

I guess I have the game modes both on my server working just fine, but I am looking for a script, or something to rotate between the two game modes or have something to allow players to vote on which game mode to play. I have scoured the internet looking for solutions but I haven’t found anything.