Results 1 to 8 of 8
  1. #1
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669

    Restore Original Value

    Code:
    int i;
    int original;
    DWORD cshell;
    DWORD editable;
    void originalVal(DWORD Pointer, DWORD Offset)
    {
    for(i=0;i<600;i++)
    cshell=(DWORD)(GetModuleHandle("CShell.dll"))
    editable=*(DWORD*)(cshell+pointer);
    	{
    	original[i]=editable+offset;
    	}
    }
    
    if(something==1)
    else
    originalVal(0x123456,0x123);
    Would this work?

  2. #2
    darlwis's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    228
    Reputation
    33
    Thanks
    53
    My Mood
    Inspired
    Do u one to know the original value of an Addie?

  3. #3
    BlackLite's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Posts
    547
    Reputation
    58
    Thanks
    1,035
    My Mood
    Aggressive
    i think UltraPGNoob can help us here because he created value logger
    example

    if noreload = 1
    float 0x0000269c = 35
    else
    no reload = orginal value 1.0float

    @UltraPGNoob help pls ?

  4. #4
    derh.acker's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    localhost
    Posts
    826
    Reputation
    14
    Thanks
    616
    My Mood
    Angelic
    That's easy programming.
    You didn't define original as an array / pointer to your allocated memory and you have to read from the address, not to save the address itself. ( original[i]=*(int*)(editable+offset); )

    Edit : Do you want to save the original value or to replace the changed value to the original value?
    Last edited by derh.acker; 04-07-2012 at 01:54 PM.

  5. The Following User Says Thank You to derh.acker For This Useful Post:

    dakr54 (04-07-2012)

  6. #5
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    Thanks @derh.acker for pointing that out but this is pretty much pseudo-code. I just wanted to know if that would work?

    I want to store a value for each weapon into an array and when the user turns off a feature I want the stored value (original) to replace the modified value.

  7. #6
    derh.acker's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    localhost
    Posts
    826
    Reputation
    14
    Thanks
    616
    My Mood
    Angelic
    It looks like it could work.

  8. #7
    dakr54's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    396
    Reputation
    16
    Thanks
    669
    So is the way I am approaching it wrong? Is it i possible it will just set the value the hack set already?

    @derh.acker

  9. #8
    UltraPGNoob's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    671
    Reputation
    15
    Thanks
    611
    My Mood
    Fine
    @BlackLite

    what about that ?

    put that in ur defines :
    Code:
    //  some defines
    typedef struct {
         float damage;
    } BACKUP;
    
    BACKUP Backup[WeaponCount]; // Weapon Count should be 621
    bool init = false;
    then put in ur hack loop :

    Code:
    if(!init)
    {
          for(int i=0;i<WeaponCount;i++)
          {
                Backup[i].damage = *(float*)(Weapon+0x7F8);
          }
          init = true;
    }
    then if you wanna restore the value :

    Code:
    *(float*)(Weapon+0x7F8) = Backup[i].damage;
    My Threads:

    - CrossFire Mods:
    Wooden Knife

    - CrossFire Tutorials:
    How to make a logger
    Total number of guns in weaponmgr

    - CrossFire NA Addies:
    Video Settings (not useful but just wanted to share) OUTDATED

    - CrossFire NA Hacks:
    UltraPGNoob Public Hack v1 DETECTED (02-24-2011)
    UltraPGNoob Public Hack v2 DETECTED (06-22-2011)
    UltraPGNoob Public Hack v3 DETECTED (07-04-2011)

    - CrossFire EU Hacks:
    UltraPGNoob Public Hack - Special Edition (Knife Weapon Hack) DETECTED (02-26-2012)

  10. The Following 2 Users Say Thank You to UltraPGNoob For This Useful Post:

    dakr54 (12-30-2012),DOOP (04-08-2012)

Similar Threads

  1. [Info] How to Restore Original HFS Files
    By UlRRvtk7 in forum Vindictus Tutorials
    Replies: 37
    Last Post: 07-08-2011, 10:03 AM
  2. Get Original Values of PTC Commands
    By ppl2pass in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 3
    Last Post: 07-15-2010, 02:45 AM
  3. How to restore original level?
    By zenon90 in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 01-26-2010, 04:43 PM
  4. Ammo/Damage Box Values?
    By wooden_amulet in forum WarRock - International Hacks
    Replies: 4
    Last Post: 06-02-2006, 02:55 AM
  5. Cheat Engine Values
    By Bull3t in forum WarRock - International Hacks
    Replies: 0
    Last Post: 05-31-2006, 04:10 AM