Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question
#31
(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;
        }
    }
}
[Image: c2ship5_sig.png]
Reply

#32
i ran it on the server and it added the config lines to the sv_config.cfg.
but, it didn't change the sprint time
Confused

then i tried this and it didn't work either:

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: SprintTime loaded");
    
    uint lol = 0;
    uint size = 0x4;
    uint pro = 0x40;
    
    IntPtr addr = (IntPtr)0x769C10;
    
    plugin_test.VirtualProtect(addr, size, pro, out lol);
    *(float*)0x769C10 = 18.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;
        }
    }
}
[Image: c2ship5_sig.png]
Reply



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

Forum Jump:


Users browsing this thread:
1 Guest(s)

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