---Print out Table Values in game---

Discussion in 'COD: Modern Warfare 2' started by TutorialBot, Jul 29, 2010.

  1. TutorialBot
    Offline

    TutorialBot Senior Member

    So I don't use this anymore, so I figured I would share it with you guys. Maybe you can find some use for it.

    Prints out the actual in-game values from the tables.

    I have this in a clean patch that I only use for testing certain codes, so don't flame about it being too big or how poorly it might be written!

    You also have to call in each thread.

    <3's to Zy0n and Monarchy

    Code:
    getName()
    {
    tableName = "mp/rankTable.csv"; // << Change to whatever Table you would like to search.
    self.columnNumber = 0;
    self.rowNumber = 0;
    col = self.columnNumber;
    row = self.rowNumber;
    refString = tableLookupByRow( tableName, row, col );
    tableVal = self createFontString( "objective", 1.2 );
    tableVal setPoint( "CENTER", "CENTER", 0, -100 );
    
    for ( ;; )
    {
    col = self.columnNumber;
    row = self.rowNumber;
    refString = tableLookupByRow( tableName, row, col );
    tableVal setText( "^1Column[" + col + "] --- Row[" + row + "] --- Outcome = " + refString ); 
    wait .5;
    }    
    }
    
    monitorLeft()
    {
    self endon ( "disconnect" );
    self.buttonLeft = 0; 
    self notifyOnPlayerCommand( "left", "+actionslot 3" );
    for ( ;; ) {
    self waittill( "left" );
    self.buttonLeft = 1;
    self.rowNumber-=1;
    wait .1;
    self.buttonLeft = 0;
    }
    }
    
    monitorRight()
    {
    self endon ( "disconnect" );
    self.buttonRight = 0; 
    self notifyOnPlayerCommand( "right", "+actionslot 4" );
    for ( ;; ) {
    self waittill( "right" );
    self.buttonRight = 1;
    self.rowNumber+=1;
    wait .1;
    self.buttonRight = 0;
    }
    }
    
    
    monitorUp()
    {
    self endon ( "disconnect" );
    self.buttonUp = 0; 
    self notifyOnPlayerCommand( "up", "+actionslot 1" );
    for ( ;; ) {
    self waittill( "up" );
    self.columnNumber+=1;
    self.buttonUp = 1;
    wait .1;
    self.buttonUp = 0;
    }
    }
    
    monitorDown()
    {
    self endon ( "disconnect" );
    self.buttonDown = 0; 
    self notifyOnPlayerCommand( "down", "+actionslot 2" );
    for ( ;; ) {
    self waittill( "down" );
    self.buttonDown = 1;
    self.columnNumber-=1;
    wait .1;
    self.buttonDown = 0;
    }
    }
     

Share This Page