02-21-2012, 14:53
(This post was last modified: 02-21-2012, 16:21 by blueberry9.)
(02-21-2012, 08:02)zxz0O0 Wrote: Ok. Now either the addresses are wrong or it isn't loaded yet. You can try to move it to OnMapChange() if it doesn't work there then the addresses are wrong.
something's strange.
i'm not sure how that address (0x6DA708) even got into the code to begin with.
these were the addresses we were using:
Code:
unsafe public override void OnServerLoad()
{
ServerPrint("Plugin: sprintUnlimited 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*)0x587CD34 = 1;
*(int*)0x587CD50 = 1;
*(int*)0x587CD60 = 1;
anyway, i'm using these addresses and i built the dll.
the build was fine, no errors.
i ran the dll on the server and the server ran fine, no crashes.
but no unlimited sprint.
*EDIT: as you mentioned earlier, these addresses are not the right ones.
where can we find the correct address for player_sprintUnlimited.
someone's got to have it or at least know where we can get it
by the way, i sent yamraj a pm a few days ago about this plugin and still haven't gotten a response.
you mentioned this earlier:
Quote:Address of player_sprintTime: 0x769C10
Standard float value: 4.000000
Not tested.
seeing as no one has the address for player_sprintUnlimited, i'll make a plugin using player_sprintTime.
here's the code i built -- does it look ok:
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 Class1 : CPlugin
{
public int player_sprintTime_var = 0;
IntPtr j_sprintTime = (IntPtr)0x769C10;
[DllImport("kernel32.dll")]
private static extern bool VirtualProtect(IntPtr lpAddress, uint dwSize, uint flNewProtect, out uint lpflOldProtect);
unsafe public override void OnServerLoad()
{
ServerPrint("SprintTime plugin loaded.");
if (GetServerCFG("SPRINTTIMEPLUGIN", "SprintTime", "-1") == "-1")
SetServerCFG("SPRINTTIMEPLUGIN", "SprintTime", "12");
try
{
player_sprintTime_var = Convert.ToInt32(GetServerCFG("SPRINTTIMEPLUGIN", "SprintTime", "12"));
}
catch (Exception e)
{
ServerPrint("SprintTime plugin loaded.");
}
}
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;
}
}
}