Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
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 2.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DJseanyBundefined Offline
    DJseanyBundefined Offline
    DJseanyB
    wrote on 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
    • MBHGBundefined Offline
      MBHGBundefined Offline
      MBHGB
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • MBHGBundefined Offline
        MBHGBundefined Offline
        MBHGB
        wrote on 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?

        DJseanyBundefined 1 Reply Last reply
        0
        • MBHGBundefined MBHGB

          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?

          DJseanyBundefined Offline
          DJseanyBundefined Offline
          DJseanyB
          wrote on 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
          • DJseanyBundefined Offline
            DJseanyBundefined Offline
            DJseanyB
            wrote on last edited by
            #5

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

            MBHGBundefined 1 Reply Last reply
            0
            • DJseanyBundefined DJseanyB

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

              MBHGBundefined Offline
              MBHGBundefined Offline
              MBHGB
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • bhfffundefined bhfff referenced this topic on

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Unread 0
              • Recent
              • Tags
              • Popular
              • Users
              • Groups