Do u one to know the original value of an Addie?
Would this work?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);
Do u one to know the original value of an Addie?
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 ?
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.
dakr54 (04-07-2012)
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.
It looks like it could work.
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
@BlackLite
what about that ?
put that in ur defines :
then put in ur hack loop :Code:// some defines typedef struct { float damage; } BACKUP; BACKUP Backup[WeaponCount]; // Weapon Count should be 621 bool init = false;
then if you wanna restore the value :Code:if(!init) { for(int i=0;i<WeaponCount;i++) { Backup[i].damage = *(float*)(Weapon+0x7F8); } init = true; }
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)