APP Release [Any Version] Quick Framelimiter - No need to go in pause menu to use fpslimit 20!

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
This plugin/mod, Quick Framelimiter allows you to toggle frame limiter ON or OFF with just a key (or a command aswell if you are on 0.3.7 R1 or 0.3.DL).
For example, this comes in really handy for people like me who want to use FPS Unlocker, get above 100 fps and when I need to run/or escape a onfoot chase. I turn this on and frame limiter gets turned ON.
You can basically use this to your advantage. It's very handy..

Activation:
SPACE + INSERT (Any/All versions)
/fpslimiter (0.3.DL R1 & 0.3.7 R1)

You can use the key activation in any version so you can enable it in the heat of the moment. And, make sure you have /fpslimit set to 20 or whatever you want because it is only enabling fps limiter that is present in the settings -> video -> fps limiter, when fps limiter is off, your fps gets to max no matter how much you set in /fpslimit (except GTA's/SAMP's 90 fps limit ofc that can be bypassed with crashes.asi or samp addon)

Requirements:
Visual Studio 2019 C++ Redistributables (Takes 1 min FYI)

Source + Download: In Attachments
Virus Total: https://www.virustotal.com/gui/file...3f29980766ecdf73efa7593574f2931bcc4/detection
This is completely safe to use by the way. I don't think this is considered as a illegal mod, it's basically a hotkey to enable and disable fps limit.

Credits:
https://gtamods.com/wiki/Memory_Addresses_(SA)
Me.
 

Attachments

  • QuickFramelimiter.zip
    67.4 KB · Views: 125
  • QuickFramelimiter.asi
    105.5 KB · Views: 82

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
Thanks for the release, but your source looks more complicated then it needs to be for a deeper explaination just DM me.
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
Basically all it does is manipulate the BYTE address at 0xBA6794 that is for frame limiter, got it from the wiki stated in credits.

When it first starts it will wait for SAMP to load and once SAMP loads, it will compare the SAMP_CMP (well a HASH for samp.dll from s0biet) and see if it matches either 0.3.7 R1 or 0.3DL, if it does then command support will be enabled namely the ability to /fpslimiter (you can still SPACE + INSERT)..
I know there's a lot of unused code but I couldn't bother removing..

After checking the cmd support it will load g_Chat and g_Input structs thats basically needed for printing client messages and adding the /fpslimiter command, if no 0.3.7 R1 or 0.3DL, then it will still work but without command or messages as the fps limiter byte is for GTA not for SAMP so it doesn't change with SAMP versions.

Lastly for the key detection..
Code:
if ((GetKeyState(VK_SPACE) & 0x8000) && (GetKeyState(VK_INSERT) & 0x8000))
		{
			*(BYTE*)0xBA6794 = !*(BYTE*)0xBA6794;
			Sleep(1000);
		}

This will invert the frame limiter to what it is currently, so 0 will become 1, 1 will become 0. namely, frame limiter will be turned off or on if key is pressed.

In functions.cpp there are just functions to check if g_Chat, g_Input etc are bad (I know I could have used if they were null or smth but this is more better imo?) and adding client command, adding chat command..

It doesn't do or hook into anything else so it shouldn't give any problems..
 

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
Basically all it does is manipulate the BYTE address at 0xBA6794 that is for frame limiter, got it from the wiki stated in credits.

When it first starts it will wait for SAMP to load and once SAMP loads, it will compare the SAMP_CMP (well a HASH for samp.dll from s0biet) and see if it matches either 0.3.7 R1 or 0.3DL, if it does then command support will be enabled namely the ability to /fpslimiter (you can still SPACE + INSERT)..
I know there's a lot of unused code but I couldn't bother removing..

After checking the cmd support it will load g_Chat and g_Input structs thats basically needed for printing client messages and adding the /fpslimiter command, if no 0.3.7 R1 or 0.3DL, then it will still work but without command or messages as the fps limiter byte is for GTA not for SAMP so it doesn't change with SAMP versions.

Lastly for the key detection..
Code:
if ((GetKeyState(VK_SPACE) & 0x8000) && (GetKeyState(VK_INSERT) & 0x8000))
        {
            *(BYTE*)0xBA6794 = !*(BYTE*)0xBA6794;
            Sleep(1000);
        }

This will invert the frame limiter to what it is currently, so 0 will become 1, 1 will become 0. namely, frame limiter will be turned off or on if key is pressed.

In functions.cpp there are just functions to check if g_Chat, g_Input etc are bad (I know I could have used if they were null or smth but this is more better imo?) and adding client command, adding chat command..

It doesn't do or hook into anything else so it shouldn't give any problems..
I was talking about the isBadPtr stuff and so on from mod_sa, but as I said we should keep this thread clean.
You check for the SA:MP version therefore you shouldn't really get anything besides null pointers in return.
You can check the validity of reading a pointer by using VirtualQuery and chekc if the page is not a guard page / you have no access too.
All fine, just wanted to comment that.
 
D

Deleted member 57993

Guest
Very useful thank you.
How to change hotkey?
C++:
if ((GetKeyState(VK_SPACE) & 0x8000) && (GetKeyState(VK_INSERT) & 0x8000))
        {
            *(BYTE*)0xBA6794 = !*(BYTE*)0xBA6794;
            Sleep(1000);
        }
Just change the hotkeys for your need.
 
Top