Results 1 to 8 of 8
  1. #1
    gerherhtherherdhher's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    171
    Reputation
    26
    Thanks
    900
    My Mood
    Sad

    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 5 Users Say Thank You to gerherhtherherdhher For This Useful Post:

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

  3. #2
    Scoudem's Avatar
    Join Date
    Dec 2014
    Gender
    male
    Location
    0xC0000005
    Posts
    40
    Reputation
    10
    Thanks
    2,092
    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 04: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
    gerherhtherherdhher's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    171
    Reputation
    26
    Thanks
    900
    My Mood
    Sad
    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 gerherhtherherdhher; 06-10-2016 at 04:47 PM.

  7. The Following User Says Thank You to gerherhtherherdhher 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
    datbigsmirk's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Umm, excuse me. I know this is somewhat irrelevant but which language is the code written in?

  10. #7
    Furtive's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    13
    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

  11. #8
    D3v17Dy7's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    48
    My Mood
    Aggressive
    Host only, right?
    Either way, thanks for this, Xen0

Similar Threads

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