08-28-2012, 01:49
(This post was last modified: 09-13-2012, 19:26 by blueberry9.)
this one is for all the tactical crouch server admins and anyone else who wants to stop players from sprinting in their servers.
my sprint disable plugin runs on @Nukem's MW3 Server Addon version 1.413 with the 1.9.446 patch.
again, many thanks to @zxz0O0 for helping me out and for the offset.
download link below.
This plugin reduces the sprint duration to 0 seconds.
i tested it. it works.
you cannot run with this plugin installed.
Requirements:
@Nukem's dedicated server addon v1.413
No commands needed.
Place the sprintDisable_1.0.dll in your plugins folder.
Enjoy.
Source Code:
my sprint disable plugin runs on @Nukem's MW3 Server Addon version 1.413 with the 1.9.446 patch.
again, many thanks to @zxz0O0 for helping me out and for the offset.
download link below.
This plugin reduces the sprint duration to 0 seconds.
i tested it. it works.
you cannot run with this plugin installed.
Requirements:
@Nukem's dedicated server addon v1.413
No commands needed.
Place the sprintDisable_1.0.dll in your plugins folder.
Enjoy.
Source Code:
Code:
using System;
using System.Runtime.InteropServices;
using System.Security;
using Addon;
//Compile with /unsafe
//And a reference to "addon/dist/addon.dll"
namespace SprintDisable_1_0
{
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);
public override void OnMapChange()
{
SetDvar("perk_sprintMultiplier", "0");
}
unsafe public override void OnServerLoad()
{
ServerPrint("Plugin: Sprint Disable 1.0 by blueberry9 & zxz0O0 loaded.");
int oP;
byte[] bytes = { 0x90, 0x90 };
WriteProcessMemory(((IntPtr)(-1)), 0x40C8D7, bytes, bytes.Length, out oP);
}
}
}