question
#11
(02-17-2012, 22:27)master131 Wrote: Bah, I just realised this was for the dedi server thingy, erm I'll have a look inside that and see if I can find anything.

EDIT - I think I found player_sprintUnlimited, just write 1 (integer) to each of these addresses:
0x587CD34
0x587CD50
0x587CD60

Have fun. Big Grin I haven't tested it yet but hopefully it'll work.

i tested it, it doesn't work
Reply

#12
(02-18-2012, 00:15)Deviler86 Wrote:
(02-17-2012, 22:27)master131 Wrote: Bah, I just realised this was for the dedi server thingy, erm I'll have a look inside that and see if I can find anything.

EDIT - I think I found player_sprintUnlimited, just write 1 (integer) to each of these addresses:
0x587CD34
0x587CD50
0x587CD60

Have fun. Big Grin I haven't tested it yet but hopefully it'll work.

i tested it, it doesn't work

thanks to both of you!


[Image: c2ship5_sig.png]
Reply

#13
i tried compling this code but got errors.
need some help


Code:
using System; using System.Runtime.InteropServices; using System.Security; using Addon; //Compile with /unsafe //And a reference to "addon/dist/addon.dll" namespace sprintUnlimited { public class Program : CPlugin { [DllImport("kernel32.dll", SetLastError = true)] public static extern bool WriteProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, int nSize, out int lpNumberOfBytesWritten); unsafe public override void OnServerLoad() { ServerPrint("Plugin: Unlimited Sprint loaded."); int dwout = 0; byte[] bytes = { 0x90, 0x90, 0x90, 0x90 }; byte[] bytes2 = { 0x90, 0x90, 0x90 }; WriteProcessMemory(((IntPtr)(-1)), 0x587CD34, bytes, bytes.Length, out dwout); WriteProcessMemory(((IntPtr)(-1)), 0x587CD50, bytes2, bytes2.Length, out dwout); WriteProcessMemory(((IntPtr)(-1)), 0x587CD60, bytes2, bytes2.Length, out dwout); } } }
[Image: c2ship5_sig.png]
Reply

#14
(02-18-2012, 04:29)blueberry9 Wrote: i tried compling this code but got errors.
need some help

With this code you are nop'ing the adresses (no operations). You want to set it to 1, not nop it.

Take a look at @JariZ' jump height plugin or @Pozzuh's Speed plugin
[Image: azuw.jpg]
Reply

#15
(02-18-2012, 10:27)zxz0O0 Wrote:
(02-18-2012, 04:29)blueberry9 Wrote: i tried compling this code but got errors.
need some help

With this code you are nop'ing the adresses (no operations). You want to set it to 1, not nop it.

Take a look at @JariZ' jump height plugin or @Pozzuh's Speed plugin

thanks zxz0O0.
i have to be honest, i'm completely shooting in the dark here.
certain aspects of this i comprehend.
other aspects, i'm just clueless on.
i looked at the code for both of the plugins you mentioned but even those generate errors from either IDE (VS or VCE).

i need to study this stuff a lot more.
just haven't had the time, what with everyday life stuff happening.

just asking a small favor here, is it possible you can write this plugin for me?
[Image: c2ship5_sig.png]
Reply

#16
Well, let's just take the base, @JariZ jump height plugin. (Thanks @JariZ)
Code:
using System; using System.Collections.Generic; using System.Runtime.InteropServices; using Addon; namespace plugin_test { //"<class name> : CPlugin" is needed to inherit the functions public class plugin_test : CPlugin { //Example overrides for functions public override void OnServerFrame() { } [DllImport("kernel32.dll")] static extern bool VirtualProtect(IntPtr lpAddress, uint dwSize, uint flNewProtect, out uint lpflOldProtect); unsafe public override void OnServerLoad() { ServerPrint("Plugin: Jumpheight by Nukem & JariZ loaded"); uint lol = 0; uint size = 0x4; uint pro = 0x40; IntPtr addr = (IntPtr)0x6DA708; IntPtr addr2 = (IntPtr)0x6D9634; IntPtr addr3 = (IntPtr)0x6DE490; VirtualProtect(addr, size, pro, out lol); VirtualProtect(addr2, size, pro, out lol); VirtualProtect(addr3, size, pro, out lol); *(float*)0x6DA708 = 1000.0f; *(float*)0x6D9634 = 999999.0f; *(float*)0x6DE490 = 1000000.0f; } public override ChatType OnSay(string Message, ServerClient Client) { return Addon.ChatType.ChatContinue; } public override string OnCheckBan(string xuid) { //Return a string if the player is banned //otherwise return null //xuid = xuid in the "status" command return null; } } }

The memory is write protected so we need to use VirtualProtect to make it read-write. Size of a integer value is 4bytes. Read-write value for VirtualProtect is 0x40 (See microsoft website: http://msdn.microsoft.com/en-us/library/...85%29.aspx ).

We can comment everything not useful out, change addresses with the adresses of @master131 and change values.

Code:
using System; using System.Collections.Generic; using System.Runtime.InteropServices; using Addon; namespace plugin_test { //"<class name> : CPlugin" is needed to inherit the functions public class plugin_test : CPlugin { //Example overrides for functions //public override void OnServerFrame() //{ //} [DllImport("kernel32.dll")] static extern bool VirtualProtect(IntPtr lpAddress, uint dwSize, uint flNewProtect, out uint lpflOldProtect); unsafe public override void OnServerLoad() { ServerPrint("Plugin: Jumpheight by Nukem & JariZ loaded"); uint lol = 0; uint size = 0x4; uint pro = 0x40; IntPtr addr = (IntPtr)0x587CD34; IntPtr addr2 = (IntPtr)0x587CD50; IntPtr addr3 = (IntPtr)0x587CD60; VirtualProtect(addr, size, pro, out lol); VirtualProtect(addr2, size, pro, out lol); VirtualProtect(addr3, size, pro, out lol); *(int*)0x6DA708 = 1; *(int*)0x6D9634 = 1; *(int*)0x6DE490 = 1; } /*public override ChatType OnSay(string Message, ServerClient Client) { return Addon.ChatType.ChatContinue; } public override string OnCheckBan(string xuid) { //Return a string if the player is banned //otherwise return null //xuid = xuid in the "status" command return null; }*/ } }
Now when you compile in visual studio, go to properties and tick "Allow unsafe code".
[Image: azuw.jpg]
Reply

#17
ok, "Allow unsafe code" ticked.
that almost worked.
still have these two errors:

The type or namespace name 'Addon' could not be found (are you missing a using directive or an assembly reference?)"

"The type or namespace name 'CPlugin' could not be found (are you missing a using directive or an assembly reference?)"

i went into properties, then to reference paths to attempt to fix this.
dead end here.
what do i do from here?

*EDIT: i think i found something in properties to fix this...
**EDIT2: nah, that didn't work...
[Image: c2ship5_sig.png]
Reply

#18
No, you don't do this in the properties. In the menu go to View - Soulution Explorer. Now you should have Soulution Explorer on the right. There you can see References. Now right click on Refernces and press "Add reference".

Picture
[Image: visualh.png]
Snipping tool pro Fuck yea!

PS: Verweise - References
Durchsuchen - Browse

Edit: And don't forget to set the Project to .NET Framework 3.0 in Properties, otherwise the plugin won't run.
[Image: azuw.jpg]
Reply

#19
uhm, did i say thank you yet??

thank you!

that worked.

the errors are gone and VS produced a dll.

now i need to test it, right?
[Image: c2ship5_sig.png]
Reply

#20
(02-18-2012, 13:04)blueberry9 Wrote: now i need to test it, right?
Yeah, now put it on dedicated server.
[Image: azuw.jpg]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 3,876 10-13-2013, 16:54
Last Post: hmann
Rainbow please help me = question's clacki 1 3,362 09-24-2013, 15:22
Last Post: OzonE
  [Request] Might be a silly question... regarding SetPlayerData camxxcore 4 5,470 08-10-2013, 21:50
Last Post: camxxcore
  A question about the Call of Duty Black Ops king_dom 1 6,372 07-08-2013, 05:26
Last Post: DidUknowiPwn
  Help Mw2 weapon skin question FroxIVx4 1 4,085 07-06-2013, 19:22
Last Post: surtek
  Question on how to "Spawn" a flying rocket as a player? akillj 8 8,504 06-04-2013, 01:54
Last Post: rotceh_dnih
  bot question meisking 1 2,918 04-13-2013, 11:02
Last Post: SuperNovaAO
  Help [QUESTION][IDEA] Invisible Wall 99IRock 8 7,543 03-03-2013, 14:37
Last Post: Nekochan
Wink Help question [HARD] Tony. 12 10,916 03-02-2013, 22:54
Last Post: JariZ
  A Question supernuke 2 3,584 02-22-2013, 15:45
Last Post: supernuke

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.