Post: [SPRX] FPS Manipulation Scripts
10-30-2015, 05:03 PM #1
Sticky
Mary J Wannnnna
(adsbygoogle = window.adsbygoogle || []).push({}); I originally posted this in C# so I decided to convert it to SPRX C++ so that I could use it in my MW2 menu...

    enum fpsOffsets : int {
fontSize = 0x4D56DC,
xPosition = 0x4D5850,
yPosition = 0x4D5950,
fpsText = 0x323AA8
};

int fps(int offset = 0) {
return 0x253AC8 + offset;
}

void toggleFPS() {
if (*(char*)fps() == 0x41)
*(char*)fps() = *(char*)0x40;
else
*(char*)fps() = *(char*)0x41;
}

void writeFPSText(char* text, float fontScale, float xPos, float yPos) {
WriteString(fps(fpsText), text);
*(float*)(fps(xPosition)) = xPos;
*(float*)(fps(yPosition)) = yPos;
*(float*)(fps(fontSize)) = fontScale;
}
10-30-2015, 05:09 PM #2
SC58
Former Staff
Originally posted by Sticky View Post
I originally posted this in C# so I decided to convert it to SPRX C++ so that I could use it in my MW2 menu...

    enum fpsOffsets : int {
fontSize = 0x4D56DC,
xPosition = 0x4D5850,
yPosition = 0x4D5950,
fpsText = 0x323AA8
};

int fps(int offset = 0) {
return 0x253AC8 + offset;
}

void toggleFPS() {
if (*(char*)fps() == 0x41)
*(char*)fps() = *(char*)0x40;
else
*(char*)fps() = *(char*)0x41;
}

void writeFPSText(char* text, float fontScale, float xPos, float yPos) {
WriteString(fps(fpsText), text);
*(float*)(fps(xPosition)) = xPos;
*(float*)(fps(yPosition)) = yPos;
*(float*)(fps(fontSize)) = fontScale;
}


lmao you do know u can just hook a function that runs every frame and just call the engine text function, only reason the fps stuff was posted ever in the first place is cause that was one the first way people found to making a menu back in c# but now doing it is pretty dumb and more dumb for it to be done in sprx :p
10-30-2015, 05:25 PM #3
Sticky
Mary J Wannnnna
I'm using it for a pregame menu
10-30-2015, 05:27 PM #4
SC58
Former Staff
Originally posted by Sticky View Post
I'm using it for a pregame menu


you can use engine text function in main menu aswell :p

i would look into using them man, you have more option of stuff u can draw and make it look more like a hud elem menu as all hudelem stuff is is engine text at the final call for each client :p

You must login or register to view this content.
this source can help ya with it

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo