• Fretta Voting?
    6 replies, posted
Hello [B]FacePunch[/B]. I want to disable gamemode voting but not map voting how can i do that? [QUOTE][B]fretta_voting 0 Disable Map Voting Too..[/B][/QUOTE]
Are you using fretta SVN or another version?
[QUOTE=zzaacckk;36661511]Are you using fretta SVN or another version?[/QUOTE] SVN, And i use this Deathrun gamemode -> [url]http://www.garrysmod.org/downloads/?a=view&id=102518[/url]
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.
[QUOTE=InfernalCookie;36666674]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.[/QUOTE] [B]Thanks You So Much![/B]
[QUOTE=InfernalCookie;36666674]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.[/QUOTE] 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
Sorry, you need to Log In to post a reply to this thread.