Pampour

sv_gmchanger.lua

Oct 1st, 2013
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | None | 0 0
  1. function GM:StartGamemodeVote()
  2.  
  3.         if( !GAMEMODE.m_bVotingStarted ) then
  4.        
  5.                 if ( fretta_voting:GetBool() ) then
  6.                         GAMEMODE.WinningGamemode = "prop_hunt"
  7.  
  8.                           SetGlobalBool("InGamemodeVote", true)
  9.                           GAMEMODE.m_bVotingStarted = true
  10.  
  11.                           GAMEMODE:ClearPlayerWants()
  12.                          
  13.                           GAMEMODE:StartMapVote()
  14.                        
  15.                 else
  16.                         GAMEMODE.WinningGamemode = "prop_hunt"
  17.  
  18.                           SetGlobalBool("InGamemodeVote", true)
  19.                           GAMEMODE.m_bVotingStarted = true
  20.  
  21.                           GAMEMODE:ClearPlayerWants()
  22.                          
  23.                           GAMEMODE:StartMapVote()
  24.                 end
  25.                
  26.                 timer.Simple( fretta_votetime:GetFloat(), function() GAMEMODE:FinishGamemodeVote( true ) end )
  27.                 SetGlobalFloat( "VoteEndTime", CurTime() + fretta_votetime:GetFloat() )
  28.                
  29.                 GAMEMODE.m_bVotingStarted = true;
  30.                
  31.         end
  32.  
  33. end
Advertisement
Add Comment
Please, Sign In to add comment