using System;
using System.Runtime.InteropServices;
using System.Security;
using Addon;
//Compile with /unsafe
//And a reference to "addon/dist/addon.dll"
namespace SprintExtend
{
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", "999");
}
unsafe public override void OnServerLoad()
{
ServerPrint("Plugin: Sprint_Multiplier by blueberry9 and zxz0O0 loaded.");
int oP;
byte[] bytes = { 0x90, 0x90 };
WriteProcessMemory(((IntPtr)(-1)), 0x0040C877, bytes, bytes.Length, out oP);
}
}
}