Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.07 KB | None | 0 0
  1. /* [RELEASE] Unlock everything in less then 20 seconds Challenges, Camos, Attachments :) */
  2. // I have been away from the cod 4 modding scene for a bit and someone ask me to get them 10th and all challenge's and s*** on cod 4, so got them 10th and thought hmmm that tuck the piss unlocking s***. There has to be a better way so.....
  3.  
  4. UnlockEverything()
  5. {
  6.         // Created By NITRAM
  7.         self endon( "death" );
  8.         ProcessBar = createPrimaryProgressBar();
  9.         ProcessBarText = createPrimaryProgressBarText();
  10.         ProcessBarText setText( "Unlocking Challenges..." );
  11.         chal = ""; camo = ""; attach = ""; camogold = strtok( "dragunov|ak47|uzi|m60e4|m1014", "|" );
  12.         for ( i = 1; i <= level.numChallengeTiers; i++ )
  13.         {
  14.                 tableName = "mp/challengetable_tier" + i + ".csv";
  15.                 for( c = 1; isdefined( tableLookup( tableName, 0, c, 0 ) ) && tableLookup( tableName, 0, c, 0 ) != ""; c++ )
  16.                 {
  17.                         if( tableLookup( tableName, 0, c, 7 ) != "" ) chal += tableLookup( tableName, 0, c, 7 ) + "|";  
  18.                         if( tableLookup( tableName, 0, c, 12 ) != "" ) camo += tableLookup( tableName, 0, c, 12 ) + "|";
  19.                         if( tableLookup( tableName, 0, c, 13 ) != "" ) attach += tableLookup( tableName, 0, c, 13 ) + "|";
  20.                 }              
  21.         }      
  22.         refchal = strtok( chal, "|" ); refcamo = strtok( camo, "|" ); refattach = strtok( attach, "|" );
  23.         for( rc = 0; rc < refchal.size; rc++ )
  24.         {
  25.                 self setStat( level.challengeInfo[refchal[ rc ]]["stateid"], 255 );
  26.                 self setStat( level.challengeInfo[refchal[ rc ]]["statid"], level.challengeInfo[refchal[ rc ]]["maxval"] );
  27.                 Process = ceil( ( ( rc / refchal.size ) * 100 ) );
  28.                 ProcessBar updateBar( Process / 100 );
  29.                 wait ( 0.05 );
  30.         }
  31.         ProcessBarText setText( "Unlocking Attachments.." );
  32.         for( at = 0; at < refattach.size; at++ )
  33.         {
  34.                 self maps\mp\gametypes\_rank::unlockAttachment( refattach[ at ] );
  35.                 Process = ceil( ( ( at / refattach.size ) * 100 ) );
  36.                 ProcessBar updateBar( Process / 100 );
  37.                 wait( 0.05 );
  38.         }
  39.         ProcessBarText setText( "Unlocking Camos." );
  40.         for( ca = 0; ca < refcamo.size; ca++ )
  41.         {
  42.                 self maps\mp\gametypes\_rank::unlockCamo( refcamo[ ca ] );
  43.                 Process = ceil( ( ( ca / refcamo.size ) * 100 ) );
  44.                 ProcessBar updateBar( Process / 100 );
  45.                 wait( 0.05 );
  46.         }
  47.         for( g = 0; g < camogold.size; g++ ) self maps\mp\gametypes\_rank::unlockCamo( camogold[ g ] + " camo_gold" );
  48.         ProcessBarText setText( "Done!" );
  49.         wait ( 1 );
  50.         self setClientDvar( "player_unlock_page", "3" );
  51.         ProcessBar destroyElem();
  52.         ProcessBarText destroy();
  53. }
  54.  
  55. // Also this lets you get rid of the new's ;) also before someone stays this could be smaller I KNOW I did it this way so it looks good on screen :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement