OldSchoolHack

Register / Login English

[MW3] Server Addons [Update 08.02.2012]

icon Thread: [MW3] Server Addons [Update 08.02.2012]

Join Date: Mar 2010

Posts: 220

Unlimited ammo
Simply enables unlimited ammo.
Attachment at the bottom of the post

TEXT Code:
  1. using System;
  2. using System.Runtime.InteropServices;
  3. using System.Security;
  4. using Addon;
  5.  
  6. //Compile with /unsafe
  7. //And a reference to "addon/dist/addon.dll"
  8.  
  9. namespace unlimited_ammo
  10. {
  11. public class Program : CPlugin
  12. {
  13. [DllImport("kernel32.dll",SetLastError = true)]
  14. public static extern bool WriteProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, int nSize, out int lpNumberOfBytesWritten);
  15.  
  16. unsafe public override void OnServerLoad()
  17. {
  18. ServerPrint("Plugin: Unlimited ammo by Nukem loaded.");
  19.  
  20. int dwout = 0;
  21. byte[] bytes = { 0x90, 0x90, 0x90, 0x90 };
  22.  
  23. WriteProcessMemory(((IntPtr)(-1)), 0x0042C6D2, bytes, 0x4, out dwout);
  24. }
  25.  
  26. }
  27. }



http://no-haking.square7.ch/images/wbb3-header-logo.png


__________________

http://no-haking.square7.ch/images/wbb3-header-logo.png