if i am right cuz you will find that all weapons are *4 in olly
Right ? @giniyat101
Hi Amigos,
i was wondering why we write "(pWeaponMgr + (4*i))". i mean that "4*i" what does it do ? Why we multiply the gun index by 4 ??? bcs the float takes 4 bytes in memory ? if yes... so why we need these 4 bytes in our hacks... ? if no explain me
Last edited by kmanev073; 03-28-2012 at 01:21 AM.
if i am right cuz you will find that all weapons are *4 in olly
Right ? @giniyat101
thats why.. they are weapon* or something
all pointers are 4 bytes in 32bit applications so you multiply by 4
[img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]
yes but in my new base i get error ! and i tough that i dont know womething about this but everything is ok wiht the loop
Do you get Send Error Report?
@kmanev073
because a pointer of any size in a 32bit app is 4 bytes, the weapon pointers are in a linked list so u can either do i*4 or go and do the whole list thing with previous current and next, either or same result just coding style preference really
yea it just short outs the code so u dont have to do it 600 hundered times
and the pointer size is 4 bytes so that's why u do 4*i..then then the loop would go by 4 bytes 600 times
example: 4, 8, C, 10, 14, ,18, 1C, 20
@DaRk we work in HEX ?????????? if yes this is the prob here i work in int
@darlwis yes i get send error report but i dont use loops for weaponMgr and i am trying to make it work
---------- Post added at 10:56 AM ---------- Previous post was at 10:19 AM ----------
@Dragon(H)ell , @giniyat101, @~FALLEN~ ,@DaRk , @darlwis and all other memebers of MPGH i made it i made a NON loop base for guns !!!!!!!
@kmanev073
Use @UltraPGNoob method:
*(WORD*) (CShell+AAC3D0-0x8);
[img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]
A classic example of recursion is the definition of the factorial function, given here in C code:
for the fetures with two loops i use two things like this... and i am putting the Gun as argument but still thinking that it can be easer with referencesCode:unsigned int factorial(unsigned int n) { if (n <= 1) return 1; else return n * factorial(n-1); }
credits go to: Recursion - Wikipedia, the free encyclopedia
sory for the outside link but here peoplecan learn something
Last edited by kmanev073; 03-29-2012 at 01:10 PM.
so you made something like that:
and just called features(pWeaponMgr, 600);Code:void features(DWORD pWeapopnMgr, DWORD index) { DWORD pWeapon = *(DWORD*)(pWeaponMgr+index*4); if (pWeapon) { //OHK *(FLOAT*)(pWeapon+0x7F8) = 99999.0f; } if (index == 0) return; features(pWeaponMgr, index-1); }
really useless and will just fuck the stack, i dont suggest using it
[img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]