Results 1 to 4 of 4
  1. #1
    Admin King-OrgY's Avatar
    Join Date
    Nov 2007
    Posts
    4,537

    DrawWeapon Stats

    should be work in other cod's just find the right weaponNums
    Code:
    struct weaponStats_t
    {
        /*Kills*/
        int Bar_kills;//NUM:1
        int Bren_kills;//NUM:3
        int Pistol_kills;//NUM:4,11,22
        int Enfield_kills;//NUM:5
        int Mpfg42_kills;//NUM:6
        int Kar98k_kills;//NUM:9
        int Mosin_Nagant_Sniper_kills;//NUM:10
        int Carbiner_kills;//NUM:12
        int M1_Garand_kills;//NUM:13
        int Mosin_Nagant_kills;//NUM:18
        int Kar98k_Scope_kills;//NUM:19
        int MP40_kills;//NUM:20
        int MP44_kills;//NUM:21
        int Ppsh_kills;//NUM:24
        int Springfield_kills;//NUM:28
        int Sten_kills;//NUM:29
        int Thompsen_kills;//NUM:31
    
        /*Headshoots*/
        int Bar_headshoots;
        int Bren_headshoots;
        int Pistol_headshoots;
        int Enfield_headshoots;
        int Mpfg42_headshoots;
        int Kar98k_headshoots;
        int Mosin_Nagant_Sniper_headshoots;
        int Carbiner_headshoots;
        int M1_Garand_headshoots;
        int Mosin_Nagant_headshoots;
        int Kar98k_Scope_headshoots;
        int MP40_headshoots;
        int MP44_headshoots;
        int Ppsh_headshoots;
        int Springfield_headshoots;
        int Sten_headshoots;
        int Thompsen_headshoots;
    };
    
    extern weaponStats_t WeaponStats;
    Code:
    void Weapon_Kills()
    {
                         if(cg_entities[cg->clientNum].currentState.weapon == 1)//bar
                           WeaponStats.Bar_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 3)//Bren
                        WeaponStats.Bren_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 4)//pistol
                        WeaponStats.Pistol_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 11)//pistol
                        WeaponStats.Pistol_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 22)//pistol
                        WeaponStats.Pistol_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 5)//Entfield
                        WeaponStats.Enfield_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 6)//Mpfg42
                        WeaponStats.Mpfg42_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 9)//Kar98k
                        WeaponStats.Kar98k_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 10)//Mosin_Nagant_Sniper
                        WeaponStats.Mosin_Nagant_Sniper_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 12)//Carbiner
                        WeaponStats.Carbiner_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 13)//M1_Garand
                         WeaponStats.M1_Garand_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 18)//Mosin_Nagant
                        WeaponStats.Mosin_Nagant_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 19)//Kar98k_Scope
                        WeaponStats.Kar98k_Scope_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 20)//mp40
                        WeaponStats.MP40_kills++;                        
                        if(cg_entities[cg->clientNum].currentState.weapon == 21)//mp44
                        WeaponStats.MP44_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 14)//Ppsh
                        WeaponStats.Ppsh_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 28)//Springfield
                        WeaponStats.Springfield_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 28)//Sten
                        WeaponStats.Sten_kills++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 31)//Thompsen
                        WeaponStats.Thompsen_kills++;
    }
    Code:
    void Weapon_Headshoots()
    {
                         if(cg_entities[cg->clientNum].currentState.weapon == 1)//bar
                           WeaponStats.Bar_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 3)//Bren
                        WeaponStats.Bren_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 4)//pistol
                        WeaponStats.Pistol_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 11)//pistol
                        WeaponStats.Pistol_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 22)//pistol
                        WeaponStats.Pistol_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 5)//Entfield
                        WeaponStats.Enfield_headshoots;
                        if(cg_entities[cg->clientNum].currentState.weapon == 6)//Mpfg42
                        WeaponStats.Mpfg42_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 9)//Kar98k
                        WeaponStats.Kar98k_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 10)//Mosin_Nagant_Sniper
                        WeaponStats.Mosin_Nagant_Sniper_headshoots;
                        if(cg_entities[cg->clientNum].currentState.weapon == 12)//Carbiner
                        WeaponStats.Carbiner_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 13)//M1_Garand
                         WeaponStats.M1_Garand_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 18)//Mosin_Nagant
                        WeaponStats.Mosin_Nagant_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 19)//Kar98k_Scope
                        WeaponStats.Kar98k_Scope_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 20)//mp40
                        WeaponStats.MP40_headshoots++;                        
                        if(cg_entities[cg->clientNum].currentState.weapon == 21)//mp44
                        WeaponStats.MP44_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 14)//Ppsh
                        WeaponStats.Ppsh_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 28)//Springfield
                        WeaponStats.Springfield_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 28)//Sten
                        WeaponStats.Sten_headshoots++;
                        if(cg_entities[cg->clientNum].currentState.weapon == 31)//Thompsen
                        WeaponStats.Thompsen_headshoots++;
    }
    Code:
    void (*orig_CG_Orbituary) ( entityState_t *ent );
    void CG_Obituary( entityState_t *ent )
    { 
    
    
        int                iTarget        = ent->targetEntityNum;
        int                iAttacker    = ent->attackerEntityNum;
        int                iMod        = ent->eventParam;
        
        clientInfo_t *    ciTarget    = NULL;
        clientInfo_t *    ciAttacker    = NULL;
    
        if( iTarget >= 0 && iTarget < MAX_CLIENTS )
        {
            ciTarget = &clientinfo[ iTarget ];
    
            cg_entities[ iTarget ].currentState.eFlags &= 1;
        
            if( iAttacker >= 0 && iAttacker < MAX_CLIENTS )
                ciAttacker = &clientinfo[ iAttacker ];
                else
                iAttacker = ENTITYNUM_WORLD;
    
            if( ciAttacker && ciAttacker->clientNum == cg->clientNum )
            {
                if( ciTarget->clientNum == cg->clientNum )
                {}
                else
                {
                    if( ( iMod & 0xFFFFFF7F ) == 7 )
                    {
                          Weapon_Kills();                    
                    }
                    else if( ( iMod & 0xFFFFFF7F ) == 8 )
                    {
                           Weapon_Kills();
                        Weapon_Headshoots();    
                    }
                    else
                    {
                         Weapon_Kills();
                    }
                }
            }
        
        }
        orig_CG_Orbituary( ent );
        
    }

    DrawIt

    Code:
    void DrawWeaponStats()
    {
        *(int *)0x15B8AA4 |= 2;
    
              
    int posY = 50;
    int posX = 30;
    
    char Kills[128];
    char Headshoots[128];
    
    
    g_pDraw.CG_FillRect(posX-5,posY-5, 370, 338,      back_color );
    g_pDraw.CG_DrawRect(posX-5,posY-5, 370, 338, 0.9, line_color );
    
    
    sprintf(Kills,"Bar Kills: ^1%i",WeaponStats.Bar_kills);
    sprintf(Headshoots,"Bar Headshoots: ^1%i",WeaponStats.Bar_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+15,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Bren Kills: ^1%i",WeaponStats.Bren_kills);
    sprintf(Headshoots,"Bren Headshoots: ^1%i",WeaponStats.Bren_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+30,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+45,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Pistol Kills: ^1%i",WeaponStats.Pistol_kills);
    sprintf(Headshoots,"Pistol Headshoots: ^1%i",WeaponStats.Pistol_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+60,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+75,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Enfield Kills: ^1%i",WeaponStats.Enfield_kills);
    sprintf(Headshoots,"Enfield Headshoots: ^1%i",WeaponStats.Enfield_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+90,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+105,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
     
    //////////////////////
    
    sprintf(Kills,"Mpfg42 Kills: ^1%i",WeaponStats.Mpfg42_kills);
    sprintf(Headshoots,"Mpfg42 Headshoots: ^1%i",WeaponStats.Mpfg42_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+120,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+135,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    
    //////////////////////
    
    sprintf(Kills,"Kar98k Kills: ^1%i",WeaponStats.Kar98k_kills);
    sprintf(Headshoots,"Kar98k Headshoots: ^1%i",WeaponStats.Kar98k_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+150,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+165,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"MosinNagantSniper Kills: ^1%i",WeaponStats.Mosin_Nagant_Sniper_kills);
    sprintf(Headshoots,"MosinNagantSniper Headshoots: ^1%i",WeaponStats.Mosin_Nagant_Sniper_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+180,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+195,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Carbiner Kills: ^1%i",WeaponStats.Carbiner_kills);
    sprintf(Headshoots,"Carbiner Headshoots: ^1%i",WeaponStats.Carbiner_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+210,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+225,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"M1 Garand Kills: ^1%i",WeaponStats.M1_Garand_kills);
    sprintf(Headshoots,"M1 Garand Headshoots: ^1%i",WeaponStats.M1_Garand_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+240,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+255,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Mosin Nagant Kills: ^1%i",WeaponStats.Mosin_Nagant_kills);
    sprintf(Headshoots,"Mosin Nagant Headshoots: ^1%i",WeaponStats.Mosin_Nagant_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+270,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+285,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Kar98k Scope Kills: ^1%i",WeaponStats.Kar98k_Scope_kills);
    sprintf(Headshoots,"Kar98k Scope Headshoots: ^1%i",WeaponStats.Kar98k_Scope_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX,posY+300,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX,posY+315,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////TAB ->
    
    sprintf(Kills,"MP40 Kills: ^1%i",WeaponStats.MP40_kills);
    sprintf(Headshoots,"MP40 Headshoots: ^1%i",WeaponStats.MP40_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX+150,posY,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX+150,posY+15,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"MP44 Kills: ^1%i",WeaponStats.MP44_kills);
    sprintf(Headshoots,"MP44 Headshoots: ^1%i",WeaponStats.MP44_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX+150,posY+30,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX+150,posY+45,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Ppsh Kills: ^1%i",WeaponStats.Ppsh_kills);
    sprintf(Headshoots,"Ppsh Headshoots: ^1%i",WeaponStats.Ppsh_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX+150,posY+60,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX+150,posY+75,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Springfield Kills: ^1%i",WeaponStats.Springfield_kills);
    sprintf(Headshoots,"Springfield Headshoots: ^1%i",WeaponStats.Springfield_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX+150,posY+90,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX+150,posY+105,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Sten Kills: ^1%i",WeaponStats.Sten_kills);
    sprintf(Headshoots,"Sten Headshoots: ^1%i",WeaponStats.Sten_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX+150,posY+120,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX+150,posY+135,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    //////////////////////
    
    sprintf(Kills,"Thompsen Kills: ^1%i",WeaponStats.Thompsen_kills);
    sprintf(Headshoots,"Thompsen Headshoots: ^1%i",WeaponStats.Thompsen_headshoots);
    
    g_pDraw.CG_DrawStringExt(posX+150,posY+150,Kills, colorWhite, qfalse, qtrue, 6, 8, 500);
    g_pDraw.CG_DrawStringExt(posX+150,posY+165,Headshoots, colorWhite, qfalse, qtrue, 6, 8, 500);
    
    }
    pic.
    Attached Images Attached Images

  2. #2
    VIP sir3n's Avatar
    Join Date
    Jul 2006
    Location
    england
    Posts
    1,825

    Re: DrawWeapon Stats

    its thompson, carbine, headshots,

  3. #3
    Admin King-OrgY's Avatar
    Join Date
    Nov 2007
    Posts
    4,537

    Re: DrawWeapon Stats

    Quote Originally Posted by sir3n View Post
    its thompson, carbine, headshots,
    i don't care and i have the game in German, easy to translate in English

  4. #4
    Moderator Seraphim's Avatar
    Join Date
    Aug 2008
    Posts
    1,062

    Re: DrawWeapon Stats

    Forget about sir3n...he's a whore...
    Looks great


Similar Threads

  1. How do i reset my stats?
    By TheFisherman in forum Call of Duty 8: Modern Warfare 3 Cheats
    Replies: 3
    Last Post: November 21st, 2011, 05:56
  2. NO Stats shown
    By keiricky in forum ETH32
    Replies: 1
    Last Post: July 19th, 2008, 11:24
  3. cUdwn stats
    By rttnPIG in forum Gallery
    Replies: 4
    Last Post: May 4th, 2008, 20:39
  4. Rofl!! My Best Stats ever!
    By Gr4zy in forum Gallery
    Replies: 7
    Last Post: April 29th, 2008, 13:16
  5. Stats Bar
    By gumba in forum Basics
    Replies: 4
    Last Post: April 2nd, 2008, 20:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •