Advertisement
VerTical_Dev

BO2, Prestige Editor

Feb 28th, 2017
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.83 KB | None | 0 0
  1.  
  2. init_prestige() //Credits : VerTical.
  3. {
  4.     self endon ( "disconnect" );
  5.     self endon ( "quit_editor" );
  6.    
  7.     self Call_Close();
  8.    
  9.     struct = spawnstruct ();
  10.    
  11.     struct.list =  strtok ( "rank_com,rank_prestige01,rank_prestige02,rank_prestige03,rank_prestige04,rank_prestige05,rank_prestige06,rank_prestige07,rank_prestige08,rank_prestige09,rank_prestige10,rank_prestige11", "," );
  12.     struct.index = int ( 0 );
  13.     struct.hud [ 0 ] = createShader ( struct.list [ struct.index ], "CENTER", "CENTER", 0, 0, 50, 50, ( 1, 1, 1 ), 1, 2 );
  14.     struct.hud [ 1 ] = drawText ( "[{+attack}]/[{+speed_throw}] Prestige Value, [{+usereload}] Use Value, Cancel [{+melee}]", "default", 1.5, "CENTER", "CENTER", 0, 80, ( 1, 1, 1 ), 1, 2);
  15.     struct.hud [ 2 ] = drawText ( "Prestige Editor", "default", 2.0, "LEFT", "CENTER", -140, -80, ( 1, 1, 1 ), 1, 2);
  16.     struct.hud [ 3 ] = createShader ( "white", "CENTER", "CENTER", 0, 0, 300, 200, ( 0, 0, 0 ), .5, 1 );
  17.    
  18.     wait .3;
  19.     while ( isDefined ( struct ) )
  20.     {
  21.    
  22.         if ( self AttackButtonPressed () )
  23.         {
  24.             struct.index++;
  25.            
  26.             if( struct.index > 11 )
  27.                 struct.index = int ( 0 );
  28.                
  29.             struct.hud [ 0 ] setShader ( struct.list [ struct.index ], 50, 50 );
  30.             wait .1;
  31.         }
  32.        
  33.         if ( self AdsButtonPressed () )
  34.         {
  35.             struct.index--;
  36.            
  37.             if( struct.index < int ( 0 ) )
  38.                 struct.index = 11;
  39.                
  40.             struct.hud [ 0 ] setShader ( struct.list [ struct.index ], 50, 50 );
  41.             wait .1;
  42.         }
  43.        
  44.         if ( self usebuttonpressed () )
  45.         {
  46.             self.pres [ "prestige" ] = struct.index;
  47.             self setdstat ( "playerstatslist", "plevel", "StatValue", struct.index );
  48.             self iprintln ( "Prestige set to ^2" + struct.index );
  49.             wait .3;
  50.             break;
  51.         }
  52.        
  53.         if ( self MeleeButtonPressed() ) break;
  54.        
  55.         wait .05;
  56.     }
  57.     foreach ( hud in struct.hud )
  58.     hud destroy ();
  59.    
  60.     struct = undefined;
  61.     self notify ( "quit_editor" );
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement