Hello There, Guest! Login or Register


Selfmade mousefix.asi
#1
Hey :)

Long time ago when I started learning C++, I created a sensitivity-fix for SA-MP.
Even longer ago I checked out many sensitivity-fixes and came across the sens-fix which most people use here - the one where you also have an .ini file to edit the global, sniper and aiming sensitivity). I tested it myself cause so many people claimed that it works - but in fact IT DOES NOT WORK! The x and y axis will NEVER be the same with all those fixes I found - all you can do with this is change the sensitivity so much until it feels better, but in reality it never is equal. Although it is great to change the sensitivity precisely. 

There is only one fix around which is working, but it only works with Cleo and since with SAMPCAC people can get kicked for using Cleo, it is better to use the variation I created.


Since so many people kept asking me about it, here it is! :)
You can use this and the x and y axis will always be equal - no matter if you change your sensitivity ingame or with another mod or plugin!

I called it 'mousefix.asi' so that this fix can be combined with the 'sensfix.asi' to change the sensitivity very accurately (since using 1 bar ingame might be too less and 2 bars are too high already).

Sourcecode (in case someone wants to compile it himself):
Code:
#include <Windows.h>

DWORD WINAPI ThreadProc(
  _In_ LPVOID lpParameter
)
{
    Sleep(10000);

    float& fMouseAccelVertical = *(float *)0xB6EC18;
    float& fMouseAccelHorzntl = *(float *)0xB6EC1C;    
    
    for(;;)
    {
        fMouseAccelVertical = fMouseAccelHorzntl;
        Sleep(5);
    }
    return 0;
}

BOOL WINAPI DllMain(
  _In_ HINSTANCE hinstDLL,
  _In_ DWORD     fdwReason,
  _In_ LPVOID    lpvReserved
)
{
    if(fdwReason == DLL_PROCESS_ATTACH)
    {
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ThreadProc, NULL, NULL, NULL);
    }
    return 1;
}


Link to download the compiled asi: Click me
Reply
#2
I checked it. Awesome work! :)
Reply