Results 1 to 7 of 7
  1. #1
    kmanev073's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Bulgaria
    Posts
    2,400
    Reputation
    97
    Thanks
    2,537
    My Mood
    Cool

    A little explanation for weapon struct and making hacks. Please if you are noob come

    Hello guys,
    I am tired of noobs who ask me how to make hacks... So i write this tutorial ("explanation")...

    So first to make a hack you need basic c/c++ knowledge... If you read this i think you know what are you doing.
    Many of you leech and make a hack but after its patch you cant fix it bcs you don't even know what are you doing so, i will explain how is crossfire weapon struct made and will explain what we need to do so we can hack it

    basically... all we need to know there is one array of classes and each index of the array points to a part of the class...
    so in c/c++ code it looks like this...

    Code:
    struct weaponStruct
    {
    float range;
    flaot dmg;
    flaot angle;
    float weapon change delay;
    and so on...
    
    //then there is one array of classes as i said before .
    
    weaponStruct weaponArray[670];
    };
    so what is this doing ?
    this is making 670 weaponStruct structures ...

    if we want to edit something in it it is easy just :
    Code:
    weaponArray[5].dmg = 125.0f;// i use 5 bcs the 5 is the index of the knife
    easy one but we make hacks here we don't have the original source out task is more difficult... we work with addresses of the arrays, variables, structures... we don't have there names (actually even if we have them i don't think we can use them )...

    so the weapon array is stored in cshell.dll... so we get its address by :
    Code:
    DWORD dw_Cshell = (DWORD)(GetModuleHandleA("CShell.dll"));
    //or
    DWORD dw_Cshell = (DWORD)(GetModuleHandleW(L"CShell.dll"));
    then we need the address of the weaponArray so we find the weaponMgr in olly
    Code:
    #define weaponMgr 0x?????? // i don't put it bcs we want tutorial which will work for next patches :D
    
    // then we add to dw_Cshell the ewapon mgr like this (i wont explain why there are some * there bcs it is not easy to :D)
    
    DWORD dw_WeaonMgr *(DWORD*)(dw_CShell + weaponMgr);
    then we need to pass the gun index so we know which gun we are editing... (pointing to the class on that index)
    this is easy we just add the gun id multiplied by 4 bcs it is an integer and the integer needs 4 bytes in the memory so
    Code:
    DWORD dw_Weapon = *(DWORD*)(dw_WeaponMgr + 5*4); // i use 5 bcs 5 is the knife index and i think this will be our gun :D
    see how easy it is ? but now... we need to edit some varaible in the class we just pointed to like this
    Code:
    #define someAddy 0x???? // we need the offset for the variable (get it from olly or some log)
    // now we need to say that we are writing to address not just adding some thing to dw_Weapon like this
    *(float*)(dw_Wapon + someAddy) = some value; // thats it :D
    see how easy it is ? yes but this is not all if you havent noticed there is only one gun passed the knife so only the knife will be affected by our hack feature. to fix that we need to loop trough all the weapons ofc we can do this manually like the knife but this will be tiring
    so we just make loop like this
    Code:
    for (for int i = 0 ; i <= 670; i++)
    {
    
    }
    what does this do ? this creates one variable and increases it by one until it doesn't fit the second parameter

    so finally we get :

    Code:
    #define weaponMgr 0x??????
    #define someAddy 0x????
    
    DWORD dw_Cshell = (DWORD)(GetModuleHandelA("CShell.dll")); // getting cshell base
    DWORD dw_weaponMgr = *(DWORD*)(dw_Cshell+ weaponMgr); // getting pointer to weaponArray
    
    if (dw_weaponMgr) //we check if our array is loaded
    {
    for(int i = 0; i <= 670 ; i++)
    {
    DWORD dw_Weapon = *(DWORD*)(dw_weaponMgr+i*4); //getting pointer to the class ... for each gun one by one
    if (dw_Weapon)//check if our gun is loaded :D
    {
    *(flaot*)(dw_Wepon+someAddy) = some value// depends on the feature... so here we change the variable :D
    }
    }
    }
    thats it it is easy here is some picture made by me if you cant understand good

    <- open in another tab to se it fully if you dont

    I hope this will help many people not to leach and understand what they are doing
    Press thanks if you like my tutorial

    As for you minnions I worked hard, i writed this long time, i draw the picture myself, i made the codes here specially for this thread, i exaplained everything that i can, it will help many people, and i hope that the stupid questions will disappear. So pleace give it a sickly

    @Jigsaw, @Hannibal, @Hero, @DaRk, @BACKD00R
    Last edited by kmanev073; 08-08-2012 at 05:48 AM.

  2. The Following 5 Users Say Thank You to kmanev073 For This Useful Post:

    acedia (08-08-2012),ash12345 (08-08-2012),dakr54 (08-08-2012),zhanre (08-08-2012),[S]aeed (08-08-2012)

  3. #2
    ksa_Saudi Arabia's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    good job man

  4. #3
    ash12345's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    145
    Reputation
    10
    Thanks
    15
    My Mood
    Aggressive
    awesome...am learning cpp now so i will start making hacks soon!!

  5. #4
    IamH4cker's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Crossfire.exe
    Posts
    84
    Reputation
    10
    Thanks
    102
    My Mood
    Busy
    Good job, i understand it well. Btw, this a noob proof right? Because the spelling of yours, when the noob will just copy paste on it. It will not work

  6. #5
    acedia's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    CShell.dll find me there :)
    Posts
    489
    Reputation
    10
    Thanks
    144
    My Mood
    Cheeky
    man you make my life easier thanks for sharing the array... come to think of it.. its really convenient .. havent thought of using array before.. tsk tsk
    Bad things happen when good men do nothing


    Move like a shadow, Strike like a snake

  7. #6
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    It's an ok tutorial gj.

  8. The Following User Says Thank You to dakr54 For This Useful Post:

    kmanev073 (08-09-2012)

  9. #7
    kmanev073's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Bulgaria
    Posts
    2,400
    Reputation
    97
    Thanks
    2,537
    My Mood
    Cool
    @IamH4cker yes it wont work need base ofc
    @dakr54 tnx

Similar Threads

  1. [Tutorial] Use C++ code and make hacks
    By Ch40zz-C0d3r in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 99
    Last Post: 07-31-2012, 09:09 AM
  2. explanation on this grunge and smudge stuff please...
    By Dested in forum Art & Graphic Design
    Replies: 3
    Last Post: 10-19-2009, 06:38 PM
  3. For the people that make hacks
    By bobsagit in forum Combat Arms Hacks & Cheats
    Replies: 31
    Last Post: 06-25-2009, 05:10 AM
  4. WR acc for WORKING bypass and VIP hack
    By Legolaszammy in forum Trade Accounts/Keys/Items
    Replies: 2
    Last Post: 10-13-2007, 07:53 PM
  5. Can i have a noob tutorial for making hacks please?
    By wakaraka in forum WarRock - International Hacks
    Replies: 11
    Last Post: 10-13-2007, 09:52 AM