Results 1 to 8 of 8
  1. #1
    __Xen0's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    116
    Reputation
    14
    Thanks
    323
    My Mood
    Sneaky

    Golden Desert Eagle (1.2.211)

    I just wrote this little function which gives the specified client the golden desert eagle.
    Please don't release it as part of dll without asking me and leave a thanks

    Code:
    void GiveGoldenDesertEagle(int clientNum)
    {
    	static const char* deserteaglegold_mp { "deserteaglegold_mp" };
    
    	__asm {
    		PUSH EAX
    		PUSH EBX
    		PUSH EDI
    		PUSH ESI
    		MOV EAX, 0x00479500
    		PUSH deserteaglegold_mp
    		CALL EAX
    		ADD ESP, 0x04
    		MOV EDI, 0x0274
    		IMUL EDI, clientNum
    		ADD EDI, 0x0194B950
    		MOV ESI, EDI
    		ADD ESI, 0x0158
    		MOV ESI, [ESI]
    		MOV EBX, 0x00550D60
    		PUSH 0x00000000
    		PUSH 0x00
    		PUSH EAX
    		PUSH ESI
    		CALL EBX
    		ADD ESP, 0x04
    		POP EAX
    		ADD ESP, 0x08
    		MOV EBX, 0x0051FD90
    		PUSH 0x00000000
    		PUSH 0x00
    		CALL EBX
    		ADD ESP, 0x08
    		POP ESI
    		POP EDI
    		POP EBX
    		POP EAX
    	}
    }
    If called correctly (there is not much that can go wrong) it should look like this:


  2. The Following 4 Users Say Thank You to __Xen0 For This Useful Post:

    CrunchLikeTwix (07-03-2016),Fade Pot'z (06-09-2016),Kid a (06-10-2016),Scoudem (06-10-2016)

  3. #2
    Scoudem's Avatar
    Join Date
    Dec 2014
    Gender
    male
    Location
    0xC0000005
    Posts
    32
    Reputation
    10
    Thanks
    764
    My Mood
    Lurking
    In addition: if you want to switch to the weapon you can use this:

    Code:
    // G_SelectWeaponIndex(int clientNum, int iWeaponIndex)
    ((void(__cdecl*)(int clientNum, int iWeaponIndex))0x550990)(id, index);
    Where iWeaponIndex is the result of calling 0x479500
    Last edited by Scoudem; 06-10-2016 at 05:50 PM. Reason: botched

  4. The Following User Says Thank You to Scoudem For This Useful Post:

    Kid a (06-10-2016)

  5. #3
    Kid a's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    7
    My Mood
    Psychedelic
    Is it possible to use this same code to receive the defaultweapon?

  6. #4
    __Xen0's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    116
    Reputation
    14
    Thanks
    323
    My Mood
    Sneaky
    Quote Originally Posted by Kid a View Post
    Is it possible to use this same code to receive the defaultweapon?
    yes, just change the string to defaultweapon_mp. (And rename the variable so that it makes sense again)
    Also can be used for akimbo thumper!
    Last edited by __Xen0; 06-10-2016 at 05:47 PM.

  7. The Following User Says Thank You to __Xen0 For This Useful Post:

    Kid a (06-10-2016)

  8. #5
    Kid a's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Posts
    66
    Reputation
    10
    Thanks
    7
    My Mood
    Psychedelic
    Quote Originally Posted by __Xen0 View Post
    yes, just change the string to defaultweapon_mp. (And rename the variable so that it makes sense again)
    Also can be used for akimbo thumper!
    That's really interesting! Sadly my coding skills are extremely limited. I'd love to understand how these things work, but I have no idea where to start.

  9. #6
    __Xen0's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    116
    Reputation
    14
    Thanks
    323
    My Mood
    Sneaky
    Quote Originally Posted by Kid a View Post
    That's really interesting! Sadly my coding skills are extremely limited. I'd love to understand how these things work, but I have no idea where to start.
    You can ask me questions any time, I am always up for help. My steam name is http://steamcommunity.com/profiles/76561198115079009/ if you want to add me!
    Last edited by __Xen0; 06-10-2016 at 06:22 PM.

  10. The Following User Says Thank You to __Xen0 For This Useful Post:

    Kid a (06-10-2016)

  11. #7
    datbigsmirk's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Umm, excuse me. I know this is somewhat irrelevant but which language is the code written in?

  12. #8
    Furtive's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by datbigsmirk View Post
    Umm, excuse me. I know this is somewhat irrelevant but which language is the code written in?
    HTML, I suggest you learning c++ first it's the easiest language. xDDDD

Similar Threads

  1. Golden Desert Eagle
    By miki08 in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 02-19-2011, 08:25 PM
  2. Golden desert eagle keychain pics !!!!
    By Sunday. in forum CrossFire Discussions
    Replies: 21
    Last Post: 01-14-2011, 08:06 AM
  3. {SoM} [Release] Golden Desert Eagle
    By 777Aluseu777 in forum Combat Arms Mods & Rez Modding
    Replies: 31
    Last Post: 08-07-2010, 07:25 AM
  4. Golden Desert Eagle Giveaway!
    By Mudka in forum CrossFire Discussions
    Replies: 17
    Last Post: 05-27-2010, 10:53 PM
  5. [REQ] Golden Desert Eagle
    By idungetit in forum WarRock - International Hacks
    Replies: 8
    Last Post: 01-03-2009, 06:20 PM