unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > First-Person Shooters > Other FPS Games > BlackHawk Down

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2010, 03:12 AM
disco disco is offline
Administrator
 
Join Date: Feb 2010
Posts: 271
Default Engine Radar

Posted by _GHOSTER_.




Code:
****************************************
// Method:    TransformWorld
// FullName:  cWorldManager::TransformWorld
// Access:    private 
// Returns:   void
// Parameter: int worldBuffer
// Parameter: DWORD dwPointer
// Parameter: int pointerOffset
// Parameter: int * screenBuffer
****************************************
void cWorldManager::TransformWorld(int worldBuffer, DWORD dwPointer, int pointerOffset, int *screenBuffer) {

    void* altWorldCoords = (void*)0x00560160;
    __asm {
        mov ecx, dwPointer
        add ecx, pointerOffset
        mov eax, screenBuffer
        push eax
        push ecx
        push worldBuffer
        call [altWorldCoords]
        add esp, 0xC
    }

}

****************************************
// Method:    SetWorldCoordsRadar
// FullName:  cWorldManager::SetWorldCoordsRadar
// Access:    private 
// Returns:   void
// Parameter: DWORD pPointer
// Parameter: int * Buffer
****************************************
void cWorldManager::SetWorldCoordsRadar(DWORD pPointer, int *Buffer) {
    void* setRWorld = (void*)0x0055EEE0;
    __asm 
    {
        mov eax, pPointer
        add eax, 8
        mov ecx, Buffer
        push eax
        push ecx
        call [setRWorld]
        add esp, 8
    }
}

****************************************
// Method:    ConvertWorldToRadar
// FullName:  cWorldManager::ConvertWorldToRadar
// Access:    private 
// Returns:   void
// Parameter: int * transformedBuffer
// Parameter: int * newBuffer
****************************************
void cWorldManager::ConvertWorldToRadar(int *transformedBuffer, int* newBuffer) {
    void *convertWTR = (void*)0x00540E70;

    __asm {
        mov eax, transformedBuffer
        mov ecx, newBuffer
        push eax
        push ecx
        call [convertWTR]
        add esp, 8
    }
}

****************************************
// Method:    WorldToRadar
// FullName:  cWorldManager::WorldToRadar
// Access:    public 
// Returns:   cRadar*
// Parameter: DWORD pPlayer
****************************************
cRadar* cWorldManager::WorldToRadar( DWORD pPlayer ) {
    int worldBuf[15], transformedBuf[15], finalBuf[15];
    SetWorldCoordsRadar( pPlayer, worldBuf );
    this->TransformWorld((int)worldBuf, pPlayer, 0x268, transformedBuf);
    ConvertWorldToRadar( transformedBuf, finalBuf );
    return (cRadar*)finalBuf;
}
Implement...

Code:
****************************************
// Method:    Radar
// FullName:  cESP::Radar
// Access:    public 
// Returns:   void
****************************************
void cESP::Radar( int xOffset, int yOffset ) {
    cobject_t* obj   = 0;
    cRadar*       radar = 0;

    if(this->initRadarBox == 0) {
        this->radarBox = new cRect( xOffset - 100, yOffset - 100, 200, 200);
        this->initRadarBox = 1;
    }

    render->RenderOverlayBox( radarBox, "2D Radar", 0xC8FFFFFF );

    int centerX         = RADAR_X_1024 - xOffset;
    int centerY         = RADAR_Y_1024 - yOffset;
    
    for ( int i = 0; i < 50; i++ )
    {
            obj = this->player->GetPlayerByIndex( i );
    
            if( this->player->distToObject(obj) <= 35 ){
    
                radar = this->world->WorldToRadar( (DWORD)obj );
                            
                int newX = radar->x - (RADAR_X_1024 - xOffset);
                int newY = radar->y - (RADAR_Y_1024 - yOffset);

                if( obj == this->player->GetLocalPlayer    (    ) )
                    this->render->RenderFilledRect( newX, newY, 5, 5, COLOR_ARGB( 255, 255, 255, 0)    );
                else
                { 
                    if( player->isMedic( obj ) )
                        this->render->RenderMedTag      ( newX, newY, 10, 10                                );
                    else
                        this->render->RenderFilledRect( newX, newY, 5, 5, player->getTeamColor( obj )    );
                }
    
        }
    }
}
The functions we use place it at the spin map x,y. So we do very simple math to place where we want.

Enjoy or don't.
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
engine, radar

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:07 PM.