Removing Options In Lobby

I run a server and I only 1 option: the only option I want users to see is the CTF option only no others. is there a way to remove the other options?

Comments

  • defaultGames.cs Line 2709:
    function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId)
    {
       %mission = $HostMissionFile[%missionId];
       if ( %mission $= "" )
       {
          error( "Invalid mission index passed to DefaultGame::voteChangeMission!" );
          return;
       }
    
       %missionType = $HostTypeName[%missionTypeId];
       if ( %missionType $= "" )
       {
          error( "Invalid mission type id passed to DefaultGame::voteChangeMission!" );
          return;
       }
    
       if(%admin) 
       {
          messageAll('MsgAdminChangeMission', '\c2The Admin has changed the mission to %1 (%2).', %missionDisplayName, %typeDisplayName );   
          logEcho("mission changed to "@%missionDisplayName@"/"@%typeDisplayName@" (admin)");
          %game.gameOver();
          loadMission( %mission, %missionType, false );   
       }
       else 
       {
          %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
          if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
          {
             messageAll('MsgVotePassed', '\c2The mission was changed to %1 (%2) by vote.', %missionDisplayName, %typeDisplayName ); 
             logEcho("mission changed to "@%missionDisplayName@"/"@%typeDisplayName@" (vote)");
             %game.gameOver();
             loadMission( %mission, %missionType, false );   
          }
          else
             messageAll('MsgVoteFailed', '\c2Change mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100)); 
       }
    }
    

    Change to:
    function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId)
    {
       %mission = $HostMissionFile[%missionId];
       if ( %mission $= "" )
       {
          error( "Invalid mission index passed to DefaultGame::voteChangeMission!" );
          return;
       }
    
       %missionType = $HostTypeName[%missionTypeId];
       if ( %missionType $= "" )
       {
          error( "Invalid mission type id passed to DefaultGame::voteChangeMission!" );
          return;
       }
       //Begin edit
       else if (%missionType !$= "CTF")
       {
          messageAll('MsgVoteFailed', '\c2Change mission vote did not pass becuase this server is restricted to CTF maps.');
          return;
       }
       //End edit
    
       if(%admin) 
       {
          messageAll('MsgAdminChangeMission', '\c2The Admin has changed the mission to %1 (%2).', %missionDisplayName, %typeDisplayName );   
          logEcho("mission changed to "@%missionDisplayName@"/"@%typeDisplayName@" (admin)");
          %game.gameOver();
          loadMission( %mission, %missionType, false );   
       }
       else 
       {
          %totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
          if(%totalVotes > 0 && (%game.totalVotesFor / (ClientGroup.getCount() - $HostGameBotCount)) > ($Host::VotePasspercent / 100))
          {
             messageAll('MsgVotePassed', '\c2The mission was changed to %1 (%2) by vote.', %missionDisplayName, %typeDisplayName ); 
             logEcho("mission changed to "@%missionDisplayName@"/"@%typeDisplayName@" (vote)");
             %game.gameOver();
             loadMission( %mission, %missionType, false );   
          }
          else
             messageAll('MsgVoteFailed', '\c2Change mission vote did not pass: %1 percent.', mFloor(%game.totalVotesFor/(ClientGroup.getCount() - $HostGameBotCount) * 100)); 
       }
    }
    

    Didnt compile so if it doesnt work, thats y. Also note "CTF" might need to be something else, but... im lazy.
  • Thanks bud it worked!
Sign In or Register to comment.