Results 1 to 14 of 14
  1. #1
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding

    Please help, addresses, offsets etc

    Ok.

    Is an address the thing you add on to CShell?

    What is an offset?

    What is the thing you add in the loop called, like usually its 4.

    ---------- Post added at 09:51 AM ---------- Previous post was at 09:44 AM ----------

    @giniyat101 can u help

  2. #2
    A$IAN's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Germany
    Posts
    5,654
    Reputation
    274
    Thanks
    2,010
    My Mood
    Amused
    You do a weapon loop. That means you lopo through all weapons. Every weapon has its ID. In this case the Weapon ID = i.
    Then you multiplicate it with 4 because it is 4 bytes .
    ~Donater since 19th October 2011~
    ~Ex-Crossfire Minion || Resigned on 4th February 2012 ~
    Da fuck

  3. The Following User Says Thank You to A$IAN For This Useful Post:

    _corn_ (12-21-2011)

  4. #3
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    i see. is it always 4 bytes? and what is an offset

  5. #4
    Swag's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Netherlands
    Posts
    1,619
    Reputation
    19
    Thanks
    1,865
    My Mood
    Amused
    example of a offset: 0x269C
    (this is no reload)

  6. The Following User Says Thank You to Swag For This Useful Post:

    _corn_ (12-21-2011)

  7. #5
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    Quote Originally Posted by michielr View Post
    example of a offset: 0x269C
    (this is no reload)
    yeah ok thanks. for no reload, you would need addy (i think its 0x296508 or something), and offset 0x269C, is that all? so code would be like
    Code:
    for(i=0;i<560;i++)
    {
         DWORD change = ((CShell + addy) + 4 * i);
         *(float*)(change) = 45.0f;
    }

  8. #6
    DaRk's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Location
    MPGH
    Posts
    1,910
    Reputation
    119
    Thanks
    3,986
    My Mood
    Asleep
    Quote Originally Posted by _corn_ View Post
    yeah ok thanks. for no reload, you would need addy (i think its 0x296508 or something), and offset 0x269C, is that all? so code would be like
    Code:
    for(i=0;i<560;i++)
    {
         DWORD change = ((CShell + addy) + 4 * i);
         *(float*)(change) = 45.0f;
    }
    yea i think it will

  9. The Following User Says Thank You to DaRk For This Useful Post:

    _corn_ (12-21-2011)

  10. #7
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    Ok thanks all

    /solved
    /req close

  11. #8
    DaRk's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Location
    MPGH
    Posts
    1,910
    Reputation
    119
    Thanks
    3,986
    My Mood
    Asleep
    Quote Originally Posted by _corn_ View Post
    Ok thanks all

    /solved
    /req close
    @_corn_
    wait u need to add Weapon Pointer in DWORD change = *(DWORD*)(WeaponPointer +(4*i));

  12. #9
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    Quote Originally Posted by errol641 View Post
    @_corn_
    wait u need to add Weapon Pointer in DWORD change = *(DWORD*)(WeaponPointer +(4*i));
    what about the offset?? where does that go?

  13. #10
    Ryuzaki™'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    At my headquarter, catching KIRA
    Posts
    1,671
    Reputation
    41
    Thanks
    6,252
    My Mood
    Lurking
    Haha thanks for this we have the same problem I will just wait until the others reply



  14. #11
    derh.acker's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    localhost
    Posts
    826
    Reputation
    14
    Thanks
    616
    My Mood
    Angelic
    The structs look like this :
    struct WeaponInfo
    {
    BYTE Something[0x2424]; //Begins at 0, ends at 0x2423
    float OldNoReload; //WeaponInfo + 0x2424 (Old offset, I'm not longer hacking CrossFire so much)
    };
    struct WeaponMgr
    {
    WeaponInfo *WepInf[0x600]; //Every pointer takes 4 Bytes because every 32-bit application has got an address range of 4 Bytes
    };

    Somewhere in CShell.dll :
    WeaponMgr *Weapons;
    Last edited by derh.acker; 12-26-2011 at 05:59 AM.

  15. #12
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    Quote Originally Posted by derh.acker View Post
    The structs look like this :
    struct WeaponInfo
    {
    BYTE Something[0x2424]; //Begins at 0, ends at 0x2423
    float OldNoReload; //WeaponInfo + 0x2424 (Old offset, I'm not longer hacking CrossFire so much)
    };
    struct WeaponMgr
    {
    WeaponInfo *WepInf[0x600]; //Every pointer takes 4 Bytes because every 32-bit application has got an address range of 4 Bytes
    };

    Somewhere in CShell.dll :
    WeaponMgr *Weapons;
    i don't understand sorry

  16. #13
    DaRk's Avatar
    Join Date
    Dec 2010
    Gender
    male
    Location
    MPGH
    Posts
    1,910
    Reputation
    119
    Thanks
    3,986
    My Mood
    Asleep
    Quote Originally Posted by _corn_ View Post
    i don't understand sorry
    like this:
    Code:
    if(WeaponPointer)
    {
    	for(int i=0; i<576; i++)
    	{
    		DWORD wep = *(DWORD*)(WeaponPointer+(4*i));
    		{
    			if(wep)
    			{
    				*(float*)(wep + offset) = value;
    			}
    		}
    	}
    }
    WeaponPointer = 0xA68F80

  17. #14
    derh.acker's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    localhost
    Posts
    826
    Reputation
    14
    Thanks
    616
    My Mood
    Angelic
    *(float*)(x) first "converts" x to a pointer to a float, then the * before the first ( reads from or writes to the pointer.
    In 32-bit assembly reading looks like
    MOV [register], DWORD PTR DS:[x]
    and writing
    MOV DWORD PTR DS:[x], [register]

    Every 32-bit pointer is a DWORD, every 64-bit pointer is a QWORD (if the application is compiled in 32 bits, it would also be DWORD in 64 bit systems)


    The structs look like this :
    struct WeaponInfo
    {
    BYTE Something[0x2424]; //Begins at 0, ends at 0x2423
    float OldNoReload; //WeaponInfo + 0x2424 (Old offset, I'm not longer hacking CrossFire so much)
    };
    struct WeaponMgr
    {
    WeaponInfo *WepInf[600]; //Every pointer takes 4 Bytes because every 32-bit application has got an address range of 4 Bytes
    };

    Somewhere in CShell.dll :
    WeaponMgr *Weapons;
    WeaponMgr *Weapons is a pointer to a WeaponMgr structure.
    So if this WeaponMgr struct begins at A00000 (as an example) the Pointer "Weapons" is A00000.
    WeaponInfo *WepInf[600] means that in the WeaponMgr struct are 600 Pointers (600 Pointers take 2400 Bytes) to WeaponInfo structures.
    When one of the WeaponInfo structures begins at A00000, one of the pointers is A00000.
    Every WeaponInfo structure contains information about a specific weapon (like how long the reload animation is).

    If you want to read a value from every weapon, the compiler will compile it like this :
    MOV ECX, 0 // Self-explaining
    MOV EAX, DWORD PTR DS:[[WeaponMgr]] // Moves to the register EAX where WepInf points to
    5A0012 MOV EDX, 4 x ECX // Every 32-bit pointer takes 4 Bytes, so it multiplies ECX (in a for-loop normally i)
    ADD EDX, EAX //Adds EAX to EDX (If WepInf points to A00000 and EDX is 8 (i = 2), EDX now will be A00008
    MOV EDX, DWORD PTR DS:[EDX] //Moves the Pointer to the WeaponInfo structure to EDX
    MOV EBX, DWORD PTR DS:[EDX + Offset] //Moves the Value of an information of a weapon to EBX
    CMP ECX, 600 //Compare ECX with 600
    INC ECX // Add 1 to ECX
    JL 5A0012 //Jump to 5A0012 if ECX is smaller than 600

Similar Threads

  1. [Help Request] PLEASE HELP ME !!!
    By gusde07 in forum CrossFire Help
    Replies: 7
    Last Post: 09-10-2012, 08:26 PM
  2. [Help Request] Please Help
    By tongakilo in forum CrossFire Help
    Replies: 12
    Last Post: 05-22-2011, 03:02 AM
  3. [Help Request] Black Cipher Help [please help]
    By zubni in forum Combat Arms Help
    Replies: 25
    Last Post: 05-14-2011, 07:50 PM
  4. [Help Request] please help me
    By 0wninglolz in forum Combat Arms Help
    Replies: 2
    Last Post: 05-08-2011, 06:03 AM
  5. [Help Request] please help !
    By noaznoaz in forum Combat Arms EU Help
    Replies: 0
    Last Post: 05-03-2011, 06:11 AM