Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. UnlockEverything()
  2. {
  3. // Created By NITRAM
  4. self endon( "death" );
  5. ProcessBar = createPrimaryProgressBar();
  6. ProcessBarText = createPrimaryProgressBarText();
  7. ProcessBarText setText( "Unlocking Challenges..." );
  8. chal = ""; camo = ""; attach = ""; camogold = strtok( "dragunov|ak47|uzi|m60e4|m1014", "|" );
  9. for ( i = 1; i <= level.numChallengeTiers; i++ )
  10. {
  11. tableName = "mp/challengetable_tier" + i + ".csv";
  12. for( c = 1; isdefined( tableLookup( tableName, 0, c, 0 ) ) && tableLookup( tableName, 0, c, 0 ) != ""; c++ )
  13. {
  14. if( tableLookup( tableName, 0, c, 7 ) != "" ) chal += tableLookup( tableName, 0, c, 7 ) + "|";
  15. if( tableLookup( tableName, 0, c, 12 ) != "" ) camo += tableLookup( tableName, 0, c, 12 ) + "|";
  16. if( tableLookup( tableName, 0, c, 13 ) != "" ) attach += tableLookup( tableName, 0, c, 13 ) + "|";
  17. }
  18. }
  19. refchal = strtok( chal, "|" ); refcamo = strtok( camo, "|" ); refattach = strtok( attach, "|" );
  20. for( rc = 0; rc < refchal.size; rc++ )
  21. {
  22. self setStat( level.challengeInfo[refchal[ rc ]]["stateid"], 255 );
  23. self setStat( level.challengeInfo[refchal[ rc ]]["statid"], level.challengeInfo[refchal[ rc ]]["maxval"] );
  24. Process = ceil( ( ( rc / refchal.size ) * 100 ) );
  25. ProcessBar updateBar( Process / 100 );
  26. wait ( 0.05 );
  27. }
  28. ProcessBarText setText( "Unlocking Attachments.." );
  29. for( at = 0; at < refattach.size; at++ )
  30. {
  31. self maps\mp\gametypes\_rank::unlockAttachment( refattach[ at ] );
  32. Process = ceil( ( ( at / refattach.size ) * 100 ) );
  33. ProcessBar updateBar( Process / 100 );
  34. wait( 0.05 );
  35. }
  36. ProcessBarText setText( "Unlocking Camos." );
  37. for( ca = 0; ca < refcamo.size; ca++ )
  38. {
  39. self maps\mp\gametypes\_rank::unlockCamo( refcamo[ ca ] );
  40. Process = ceil( ( ( ca / refcamo.size ) * 100 ) );
  41. ProcessBar updateBar( Process / 100 );
  42. wait( 0.05 );
  43. }
  44. for( g = 0; g < camogold.size; g++ ) self maps\mp\gametypes\_rank::unlockCamo( camogold[ g ] + " camo_gold" );
  45. ProcessBarText setText( "Done!" );
  46. wait ( 1 );
  47. self setClientDvar( "player_unlock_page", "3" );
  48. ProcessBar destroyElem();
  49. ProcessBarText destroy();
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement