Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO1 Modding Releases & Resources
  3. Black Ops 1 Server Round Lock ( Customizable )

Black Ops 1 Server Round Lock ( Customizable )

Scheduled Pinned Locked Moved BO1 Modding Releases & Resources
6 Posts 2 Posters 384 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    DJseanyB
    wrote on Jan 3, 2025, 7:46 PM last edited by
    #1

    What This Script Does:

    • Keeps your server unlocked until a round YOU choose.

    • Once that round hits, it locks the server and generates a random 4-digit password.

    • Tells players the password and how to rejoin using the console.

    How It Works:

    • Before the round you choose, anyone can join like normal.

    • After the round you set, BOOM, the server locks.

    Players will see a message in the game with the password. Message will repeat in between each round so players don't forget

    
    #include common_scripts\utility;
    #include maps\_utility;
    
    init()
    {
        executeCommand( "g_password \"\"" );
        level thread SetPasswordsOnRound( 35 );
        level.locked = false; 
    }
    
    setPasswordsOnRound( roundNumber )
    {
        level endon( "disconnect" );
    
        while ( true ) 
        {
            level waittill( "between_round_over" );
            if ( level.round_number >= roundNumber )
            {
                level.locked = true; 
                pin = generateString();
                executeCommand("g_password " + pin);
                executeCommand("password " + pin);
    
                level thread messageRepeat( "^2Server is now locked. Use password ^1" + pin + " ^2to rejoin." );
                break;
            }
        }
    }
    messageRepeat( message )
    {
        level endon( "disconnect" );
        
        while ( true )
        {
            iPrintLn( message );
            level waittill( "between_round_over" );
        }
    }
    
    generateString()
    {
        str = "";
    
        for ( i = 0; i < 4; i++ )
        {
            str = str + randomInt( 10 );
        }
    
        return str;
    }
    
    
    1 Reply Last reply
    1
    • undefined Offline
      undefined Offline
      MBHGB
      wrote on Jan 3, 2025, 8:33 PM last edited by
      #2

      Thank you! I've been looking for ages trying to find a solution.

      1 Reply Last reply
      0
      • undefined Offline
        undefined Offline
        MBHGB
        wrote on Jan 3, 2025, 8:47 PM last edited by
        #3

        Just a suggestion, it is possible to get the text to appear either longer or to keep the pin in the corner permanently? When I tested it only shows for a few seconds which might not give people enough time to make note of the rejoin pin?

        undefined 1 Reply Last reply Jan 3, 2025, 9:21 PM
        0
        • undefined Offline
          undefined Offline
          DJseanyB
          replied to MBHGB on Jan 3, 2025, 9:21 PM last edited by
          #4

          MBHGB Yeah you can do that with a pretty simple Hud element. Just have it display where you want it on the screen and destroy it after sometime. The script i sent will display it at the start of every round so they should have no issue making a note of the password

          1 Reply Last reply
          1
          • undefined Offline
            undefined Offline
            DJseanyB
            wrote on Jan 3, 2025, 9:22 PM last edited by
            #5

            could alternatively use iprintlnbold in replace of iprintln to display it in center of screen

            undefined 1 Reply Last reply Jan 4, 2025, 9:28 AM
            0
            • undefined Offline
              undefined Offline
              MBHGB
              replied to DJseanyB on Jan 4, 2025, 9:28 AM last edited by
              #6

              DJseanyB Thanks I’ll give this a shot. Didn’t realise it shows every round.

              1 Reply Last reply
              0

              1/6

              Jan 3, 2025, 7:46 PM

              • Login

              • Don't have an account? Register

              • Login or register to search.
              1 / 1
              • First post
                1/6
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Donate