Fretta Voting?

Hello FacePunch.

I want to disable gamemode voting but not map voting how can i do that?

Are you using fretta SVN or another version?

SVN, And i use this Deathrun gamemode -> http://www.garrysmod.org/downloads/?a=view&id=102518

How I did it was by going into sv_gmchanger.lua ( in fretta gamemode )

Find this function
[lua]
function GM:StartGamemodeVote()
[/lua]

and replace contents with:
[lua]
if( !GAMEMODE.m_bVotingStarted ) then

	if ( fretta_voting:GetBool() ) then

		-- manually set what would be the result of a GM vote otherwise
		  GAMEMODE.WinningGamemode = "deathrun"

		  SetGlobalBool("InGamemodeVote", true)
		  GAMEMODE.m_bVotingStarted = true

		  GAMEMODE:ClearPlayerWants()
		  
		  GAMEMODE:StartMapVote()
		
	else

		 -- manually set what would be the result of a GM vote otherwise
		  GAMEMODE.WinningGamemode = "deathrun"

		  SetGlobalBool("InGamemodeVote", true)
		  GAMEMODE.m_bVotingStarted = true

		  GAMEMODE:ClearPlayerWants()
		  
		  GAMEMODE:StartMapVote()
		
	end
	
	timer.Simple( fretta_votetime:GetFloat(), function() GAMEMODE:FinishGamemodeVote( true ) end )
	SetGlobalFloat( "VoteEndTime", CurTime() + fretta_votetime:GetFloat() )
	
	GAMEMODE.m_bVotingStarted = true;
	
end

[/lua]

Basically all this is doing is by-passing the actual gamemode voting by setting the values to the gamemode you want.

Thanks You So Much!

Sir, you’re a genius!
One last question, how do I remove the ‘Vote Change Gamemode’ button in F1, and replace it with ‘Vote Change Map’?

Becuase I don’t really need it anymore.

That works fine other then when it goes to mapvote and after you choose a map and the map vote ends it briefly flashes the mapvote again and timer.

So im guessing fretta_votetime:getfloat() should be removed in timer but not sure