ItsMods

Full Version: Sprint Disable Plugin for version 1.9.446
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:

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);
        }
    }
}
You always create such small but very useful plugins, +rep !
crouch servers Fuu
thanks
Thanks +rep given Big Grin
dll in the plugin folder and move the sv_config.ini anpassen.Was I write in there in sv_config.ini .. please help...MW3 with the 1.9.461