ItsMods

Full Version: Jumpheight
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2


Credits
- @Nukem
- @JariZ

Download
[attachment=1416]

Source (on request of @zxz0O0)
CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using Addon;
  6.  
  7. namespace plugin_test
  8. {
  9. //"<class name> : CPlugin" is needed to inherit the functions
  10. public class plugin_test : CPlugin
  11. {
  12. //Example overrides for functions
  13. public override void OnServerFrame()
  14. {
  15. }
  16.  
  17. [DllImport("kernel32.dll")]
  18. static extern bool VirtualProtect(IntPtr lpAddress, uint dwSize,
  19. uint flNewProtect, out uint lpflOldProtect);
  20.  
  21. unsafe public override void OnServerLoad()
  22. {
  23. ServerPrint("Plugin: Jumpheight by Nukem & JariZ loaded");
  24.  
  25. uint lol = 0;
  26. uint size = 0x4;
  27. uint pro = 0x40;
  28.  
  29. IntPtr addr = (IntPtr)0x6DA708;
  30. IntPtr addr2 = (IntPtr)0x6D9634;
  31. IntPtr addr3 = (IntPtr)0x6DE490;
  32.  
  33. plugin_test.VirtualProtect(addr, size, pro, out lol);
  34. plugin_test.VirtualProtect(addr2, size, pro, out lol);
  35. plugin_test.VirtualProtect(addr3, size, pro, out lol);
  36. *(float*)0x6DA708 = 1000.0f;
  37. *(float*)0x6D9634 = 999999.0f;
  38. *(float*)0x6DE490 = 1000000.0f;
  39. }
  40.  
  41. public override ChatType OnSay(string Message, ServerClient Client)
  42. {
  43. return Addon.ChatType.ChatContinue;
  44. }
  45.  
  46. public override string OnCheckBan(string xuid)
  47. {
  48. //Return a string if the player is banned
  49. //otherwise return null
  50. //xuid = xuid in the "status" command
  51. return null;
  52. }
  53. }
  54. }
Cool, you should make a config setting to change the height though.
my server wont loaded :\
@nyu_vo Did you update it already?
It uses the new API
ye have update to 1.15, but server console not show on startup plugins loaded..
awesome i cant wait to use this
Recorded with a toaster Troll

OnTopic:

You guys are getting better, maybe i get back to play MW "three" again.

Thanks Barata...
@barata haha, 240p FTW
I'd love to see source code like with your previous plugins.
It's basically this
Code:
//This lowers the protection level of the adress so you can change it.
IntPtr jumpheight = (IntPtr)0x??????;//the jump height address
uint size = 4; //size is 4 bytes because the value is a float.
uint newProtect = 0x40;
uint oldProtect = 0;
VirtualProtect(jumpheight, size, newProtect, out oldProtect);
//The change:
*(float*)0x?????? = 1000f;//the jump height address
Pages: 1 2