Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > Anti-Cheat Software & Programming > Direct3D

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Direct3D
hacking programming reversing
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

FPS dont want be shown.....
Old 09-01-2010, 05:52 PM   #1
n00bie

DJ_Mic's Avatar

Join Date: Aug 2010
Posts: 18
Reputation: 10
Rep Power: 18
DJ_Mic has made posts that are generally average in quality
FPS dont want be shown.....

Hey,

@first: Sorry for my bad english im german.

Ok, an now on my Coding-Problem. My Code, dont want show me my FPS^^


This is my main.cpp:
Code:
#define _CRT_SECURE_NO_WARNINGS 
#include <windows.h>
#include <time.h> // header file for time functions
#include <stdio.h> //header file for (sprintf)

#include <d3d9.h>
#pragma comment(lib, "d3d9.lib")

#include <d3dx9.h>
#pragma comment(lib, "d3dx9.lib")

#include "detours.h"
#include "../../include/dx9hook.h"
#include "../../include/dx9table.h"

#pragma warning( disable : 4996 )
#pragma warning( disable : 4244 )
#pragma warning( disable : 4129 )

//vars for framerate
float fFps = 0.0f;
float fLastTickCount = 0.0f;
float fCurrentTickCount;
char cFrameRate[50] = {0};

HRESULT (APIENTRY *pfnEndScene)( IDirect3DDevice9 *pDevice );
HRESULT APIENTRY hook_EndScene(IDirect3DDevice9 *pDevice){


    fCurrentTickCount = clock() * 0.001f; 
    ++fFps;

    if((fCurrentTickCount - fLastTickCount) > 1.0f)
    {
        fLastTickCount = fCurrentTickCount;
        sprintf(cFrameRate, "[ FPS: %d ]", int(fFps)); //print framerate
        fFps = 0;
    }

    return pfnEndScene(pDevice);
}

BOOL APIENTRY DllMain( HMODULE hInstance, DWORD dwReason, LPVOID lpReserved )
{
    switch(dwReason) {
        case DLL_PROCESS_ATTACH:
            DisableThreadLibraryCalls((HMODULE)hInstance);
            if(!DirectX9Detour(DX9_ENDSCENE, (FARPROC)&hook_EndScene, (FARPROC)&pfnEndScene)) {
                MessageBoxA(HWND_DESKTOP, "DirectX9Detour failed.", "DirectX9Detour", MB_ICONERROR);
                return FALSE;
            }
            break;

        case DLL_PROCESS_DETACH:
            DirectX9Cleanup();
            break;
    }

    return TRUE;
}
This Code worked befor on all games, it displayed an whit quadrat. then i changed the code to the fps display, and it dont work.... i dont know what to do...

i hope someone of you can help me i like this forum

Last edited by DJ_Mic; 09-01-2010 at 06:06 PM.
DJ_Mic is offline

Reply With Quote


Old 09-01-2010, 05:56 PM   #2
:3 1337 :3

Wieter20's Avatar

Join Date: Nov 2008
Location: The Netherlands
Posts: 979
Reputation: 14563
Rep Power: 204
Wieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server spaceWieter20 's rep takes up 1 gig of server space
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (1)
Points: 13,900, Level: 15
Points: 13,900, Level: 15 Points: 13,900, Level: 15 Points: 13,900, Level: 15
Activity: 1.2%
Activity: 1.2% Activity: 1.2% Activity: 1.2%
Last Achievements
first off, dont wanna be a back seat moderator but i suggest you remove those offsite links...

and second..
you should learn some coding?

how is it gonna be displaying the FPS if you dont even draw it...
all i see is u puting the fps in to the cFrameRate char..
__________________
hai
Wieter20 is offline

Reply With Quote

Old 09-01-2010, 06:09 PM   #3
n00bie

DJ_Mic's Avatar

Threadstarter
Join Date: Aug 2010
Posts: 18
Reputation: 10
Rep Power: 18
DJ_Mic has made posts that are generally average in quality
Roverturbo make this same??
Look here!

Displaying the framerate

I now its a long time ago, he writes this. I think it must work, or not?
Please dont be so hard to me, i want to learn it.
DJ_Mic is offline

Reply With Quote

Old 09-01-2010, 06:16 PM   #4

CallMeEclipse's Avatar

Join Date: Jul 2009
Location: California
Posts: 2,330
Reputation: 33489
Rep Power: 412
CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!
Delta Fighter Champion Jumpin Joe Champion
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (1)
Points: 26,395, Level: 23
Points: 26,395, Level: 23 Points: 26,395, Level: 23 Points: 26,395, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Quote:
Originally Posted by DJ_Mic View Post
Roverturbo make this same??
Look here!

Displaying the framerate

I now its a long time ago, he writes this. I think it must work, or not?
Please dont be so hard to me, i want to learn it.
your not listening.. you are NOT DRAWING anything.. what are you expecting to see..
__________________


(1217 AM) uNrEaL: One man's slap in the face is another man's slit throat
CallMeEclipse is offline

Reply With Quote

Old 09-01-2010, 06:19 PM   #5
*_*

HOOAH07's Avatar

Join Date: Apr 2008
Location: H.M.P
Posts: 5,438
Reputation: 92853
Rep Power: 1083
HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!HOOAH07 has a huge epeen!
Recognitions:
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 68,717, Level: 38
Points: 68,717, Level: 38 Points: 68,717, Level: 38 Points: 68,717, Level: 38
Activity: 66.7%
Activity: 66.7% Activity: 66.7% Activity: 66.7%
Last Achievements
Award-Showcase
notice the difference yet???

Code:
void FPS(LPDIRECT3DDEVICE9 Device_Interface)
{
	////FPS////
	CurrentTickCount = clock() * 0.001f;
	Fps++;

	if((CurrentTickCount - LastTickCount) > 1.0f)
	{
		LastTickCount = CurrentTickCount;
		sprintf(FrameRate, "[ FPS: %d ]", Fps);
		Fps = 0;
	}
	PrintText(m_font, 1, 1, 255, 0, 50, 255, FrameRate);  /// im drawing it here
}
	////END OF FPS////
really strange how you said it worked on all games :O
__________________
┐(_)

°º¤ø„¸¨°º¤ø„¸¸„ø¤º°¨¸„ø¤º°¨

¨°º¤ø„¸ MONKEY „ø¤º°¨

„ø¤º°¨ FOREVER `°º¤ø...
xTc charging me up like a battery, Like 1000 volts rushing through my body
HOOAH07 is online now

Reply With Quote

Old 09-01-2010, 06:24 PM   #6
n00bie

DJ_Mic's Avatar

Threadstarter
Join Date: Aug 2010
Posts: 18
Reputation: 10
Rep Power: 18
DJ_Mic has made posts that are generally average in quality
Sorry, im listening, but i thought that the printf displayed it too....

Ok sorry, an why this code want work?

Code:
class CDX9DrawUtils {
private:
    bool bInit;
    ID3DXFont* m_pFont;
 
public:
    void init(IDirect3DDevice9* pDevice) {
        if(!bInit) {
            D3DXCreateFont(pDevice, 15, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &m_pFont);
            bInit = true;
        }
    }
 
    void drawText(int x, int y, int red, int green, int blue, int alpha, const char *text,...) { 
        D3DCOLOR fontColor = D3DCOLOR_ARGB(alpha, red, green, blue);
        RECT rct;
        rct.left=x; 
        rct.top=y; 
        rct.right=rct.left+350; 
        rct.bottom=rct.top+350;
        va_list va_alist;
        char logbuf[100] = {0};
        va_start(va_alist, text);
        _vsnprintf(logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), text, va_alist);
        va_end(va_alist);
        m_pFont->DrawText(NULL, logbuf, -1, &rct, 0, fontColor);
    }
};
CDX9DrawUtils DX9DrawUtils;


HRESULT (APIENTRY *pfnEndScene)( IDirect3DDevice9 *pDevice );
HRESULT APIENTRY hook_EndScene(IDirect3DDevice9 *pDevice){
    int myNumber = 10;
    float myFloat = 10.5f;

 
    DX9DrawUtils.init(pDevice);
    DX9DrawUtils.drawText(100, 200, 255, 0, 0, 255, "Hallo Welt");
    DX9DrawUtils.drawText(100, 200, 255, 0, 0, 255, "MyNumber %i", myNumber);
    DX9DrawUtils.drawText(100, 200, 255, 0, 0, 255, "MyFloat %f", myFloat);
     
    return pfnEndScene(pDevice); //return zum codecave wo die überschriebenen bytes stehen (funktionsprolog) und ein jump zurück zum orginalcode
}
@HOOAH07: Sorry, i mean the original Base Dx9 Hook. That have an quadrat, and this worked on GTA San Andreas and Mafia2.


//EDIT:
I also tried this code:
Code:
ID3DXFont *m_font;


HRESULT (APIENTRY *pfnEndScene)( IDirect3DDevice9 *pDevice );
HRESULT APIENTRY hook_EndScene(IDirect3DDevice9 *pDevice){
   // Create a D3DX font object
    D3DXCreateFont( pDevice, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arial"), &m_font );

    // Create a colour for the text - in this case blue
    D3DCOLOR fontColor = D3DCOLOR_ARGB(255,0,0,255);   

    // Create a rectangle to indicate where on the screen it should be drawn
    RECT rct;
    rct.left=2;
    rct.right=780;
    rct.top=10;
    rct.bottom=rct.top+20;
     
    ////FPS////
    CurrentTickCount = clock() * 0.001f;
    ++Fps;

    if((CurrentTickCount - LastTickCount) > 1.0f)
    {
        LastTickCount = CurrentTickCount;
        sprintf(FrameRate, "[ FPS: %d ]", Fps);
        Fps = 0;
    }
    m_font->DrawText(NULL, FrameRate, -1, &rct, 0, fontColor ); // Draw some text
    
    /* int myNumber = 10;
    float myFloat = 10.5f;*/

 
   // DX9DrawUtils.init(pDevice);
    //DX9DrawUtils.FPS();
    /*DX9DrawUtils.drawText(100, 200, 255, 0, 0, 255, "MyNumber %i", myNumber);
    DX9DrawUtils.drawText(100, 200, 255, 0, 0, 255, "MyFloat %f", myFloat);*/
     
    return pfnEndScene(pDevice); //return zum codecave wo die überschriebenen bytes stehen (funktionsprolog) und ein jump zurück zum orginalcode
}
And this dont work....

Last edited by DJ_Mic; 09-01-2010 at 06:53 PM.
DJ_Mic is offline

Reply With Quote

Old 09-01-2010, 07:30 PM   #7
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
maybe you should stop pasting random code together, and try to actually learn what you are doing...
__________________
learn_more is offline

Reply With Quote

Old 09-01-2010, 07:35 PM   #8
n00bie

DJ_Mic's Avatar

Threadstarter
Join Date: Aug 2010
Posts: 18
Reputation: 10
Rep Power: 18
DJ_Mic has made posts that are generally average in quality
Mh, i only want to show you what i test.
The "CDX9DrawUtils" class is from a guy. And the second is my self code.
And nothing work. I hope somebody could tell me, why. Ok sorry, if im posting bull****
DJ_Mic is offline

Reply With Quote

Old 09-01-2010, 07:55 PM   #9
◄ Super Moderator ►

Hanoi22's Avatar

Join Date: Dec 2009
Posts: 3,197
Reputation: 81923
Rep Power: 909
Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!
Fire At Will Champion Hot Pepper vs The Water Champion Krabbyball Champion If Pigs Can Fly Champion Muay Thai Champion Tadpole Champion Jumping Nutty Champion Blood Shed Champion Badger Racing Champion
Points: 55,908, Level: 35
Points: 55,908, Level: 35 Points: 55,908, Level: 35 Points: 55,908, Level: 35
Activity: 100.0%
Activity: 100.0% Activity: 100.0% Activity: 100.0%
Last Achievements
Award-Showcase
I got it working in 10minutes :P First just "print" the fps with messagebox after you get that look at your drawing funcs.
Hanoi22 is offline

Reply With Quote

Old 09-01-2010, 09:39 PM   #10
A God

rev0lt's Avatar

Join Date: Nov 2009
Location: Box.
Posts: 190
Reputation: 1978
Rep Power: 49
rev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating communityrev0lt is an oracle in the cheating community
Points: 2,044, Level: 3
Points: 2,044, Level: 3 Points: 2,044, Level: 3 Points: 2,044, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Quote:
Originally Posted by DJ_Mic View Post
Mh, i only want to show you what i test.
The "CDX9DrawUtils" class is from a guy. And the second is my self code.
And nothing work. I hope somebody could tell me, why. Ok sorry, if im posting bull****
If you genuinely wrote it, it would work for you. I remember seeing this code on another development site, which will remain nameless.

Point being, you need to learn to program, because evidently you can't.

We don't appreciate your kind here sir, take your business elsewhere.

Brb, just made some COPY PASTA! Yum.
__________________

rev0lt is offline

Reply With Quote

Old 09-01-2010, 09:40 PM   #11
n00bie

DJ_Mic's Avatar

Threadstarter
Join Date: Aug 2010
Posts: 18
Reputation: 10
Rep Power: 18
DJ_Mic has made posts that are generally average in quality
Yeah but an messagebox is not the key for my project. And i dont really understand how do you mean this. If you maybe can explain this for me please?


//EDIT: C&P is not my stile!!! And i learned Vb.net on this way, too. If nobody want to help me, ok, sorry that i waste youre time.

Last edited by DJ_Mic; 09-01-2010 at 09:42 PM.
DJ_Mic is offline

Reply With Quote

Old 09-01-2010, 10:09 PM   #12
◄ Super Moderator ►

Hanoi22's Avatar

Join Date: Dec 2009
Posts: 3,197
Reputation: 81923
Rep Power: 909
Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!
Fire At Will Champion Hot Pepper vs The Water Champion Krabbyball Champion If Pigs Can Fly Champion Muay Thai Champion Tadpole Champion Jumping Nutty Champion Blood Shed Champion Badger Racing Champion
Points: 55,908, Level: 35
Points: 55,908, Level: 35 Points: 55,908, Level: 35 Points: 55,908, Level: 35
Activity: 100.0%
Activity: 100.0% Activity: 100.0% Activity: 100.0%
Last Achievements
Award-Showcase
Messagebox is a easy and fast way to test does the fps work without messing with drawing. Too easy just CP it above Fps =0..
Code:
MessageBox( NULL, FrameRate, "FPS", NULL);
Have fun with it.
Hanoi22 is offline

Reply With Quote

Old 09-01-2010, 11:14 PM   #13

CallMeEclipse's Avatar

Join Date: Jul 2009
Location: California
Posts: 2,330
Reputation: 33489
Rep Power: 412
CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!CallMeEclipse has a huge epeen!
Delta Fighter Champion Jumpin Joe Champion
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (1)
Points: 26,395, Level: 23
Points: 26,395, Level: 23 Points: 26,395, Level: 23 Points: 26,395, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Quote:
Originally Posted by DJ_Mic View Post
Mh, i only want to show you what i test.
The "CDX9DrawUtils" class is from a guy. And the second is my self code.
And nothing work. I hope somebody could tell me, why. Ok sorry, if im posting bull****
If you want help, post your whole code, not bits and pieces of random shit.

You need to actually learn C++ to be able to code, little known fact..
__________________


(1217 AM) uNrEaL: One man's slap in the face is another man's slit throat
CallMeEclipse is offline

Reply With Quote

Old 09-01-2010, 11:28 PM   #14
h4x0!2

thelick's Avatar

Join Date: Jul 2010
Posts: 95
Reputation: 1050
Rep Power: 31
thelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of repthelick -- I am the Godfather of rep
Points: 1,473, Level: 3
Points: 1,473, Level: 3 Points: 1,473, Level: 3 Points: 1,473, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
You can ask for help here but i think that copy and pasting stuff from different sources won't help you..better thing should be starting to learn c++ and then you'll make your own source..drawing fps it's easy if you start learning c++
thelick is offline

Reply With Quote

Old 09-02-2010, 12:54 AM   #15
UnKnoWnCheaTeR

disavow's Avatar

Join Date: Jul 2009
Posts: 1,069
Reputation: 49844
Rep Power: 551
disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!disavow has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
Points: 31,281, Level: 26
Points: 31,281, Level: 26 Points: 31,281, Level: 26 Points: 31,281, Level: 26
Activity: 14.9%
Activity: 14.9% Activity: 14.9% Activity: 14.9%
Last Achievements
'sprintf' is not a drawing function.

Quote:
Originally Posted by hanoi22 View Post
Messagebox is a easy and fast way to test does the fps work without messing with drawing. Too easy just CP it above Fps =0..
Code:
MessageBox( NULL, FrameRate, "FPS", NULL);
Have fun with it.
Calling a Messagebox function like this in endscene for FPS clocking would be retarded.
__________________

Shad0w_'s Alter Ego
disavow is online now

Reply With Quote

Old 09-02-2010, 01:20 AM   #16
Level 3

SimPle01's Avatar

Join Date: Jan 2009
Location: This Post
Posts: 328
Reputation: 9770
Rep Power: 140
SimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATSSimPle01 DEFINES UNKNOWNCHEATS
Points: 8,881, Level: 11
Points: 8,881, Level: 11 Points: 8,881, Level: 11 Points: 8,881, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Last Achievements
Lawl,

Global Declares:
Code:
float fFps = 0.0f;
float fLastTickCount = 0.0f;
float fCurrentTickCount;
char cFrameRate[50] = {0};

LPD3DXFONT g_pFont = NULL;
Print Function:
Code:
void DrawString(int x, int y, DWORD color, const char *fmt, ...)
{
    RECT FontPos = { x, y, x + 120, y + 16 };
    char buf[1024] = {'\0'};
    va_list va_alist;

    va_start(va_alist, fmt);
    vsprintf(buf, fmt, va_alist);
    va_end(va_alist);
    
    g_pFont->DrawText(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
}
Code:
HRESULT (APIENTRY *pfnEndScene)( IDirect3DDevice9 *pDevice );
HRESULT APIENTRY hook_EndScene(IDirect3DDevice9 *pDevice){

    if(g_pFont == NULL) D3DXCreateFont(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Verdana", &g_pFont);

    fCurrentTickCount = clock() * 0.001f; 
    ++fFps;

    if((fCurrentTickCount - fLastTickCount) > 1.0f)
    {
        fLastTickCount = fCurrentTickCount;
        sprintf(cFrameRate, "[ FPS: %d ]", int(fFps)); //print framerate
        fFps = 0;
    }
     DrawString(10,10,D3DCOLOR_ARGB(255,255,0,0),cFrameRate);

    return pfnEndScene(pDevice);
}
DrawText Function is out of Strifes D3D9 Model Recognition Logger

GLHF, Also please don't ask how to use it. k thx .
__________________


"Love for All and Sharing is the first step to solving all the problems of humanity.
"

''The art of Wuju lives on in Master Yi, and is plunged through the hearts of his foes.'' -- Soraka, the Starchild


----------------------------------------------------------------------------
Anti-Cheat Software & Programming - Other FPS Games
----------------------------------------------------------------------------
SimPle01 is online now

Reply With Quote

Old 09-02-2010, 10:53 AM   #17
n00bie

DJ_Mic's Avatar

Threadstarter
Join Date: Aug 2010
Posts: 18
Reputation: 10
Rep Power: 18
DJ_Mic has made posts that are generally average in quality
@SimPle01:
I tried it, and it doenst work!

@all: i dont want an c&p code! i only want a sample how to display/draw a text ingame, and the rest i want to learn. You mustnt show me a sample of the frames. Only how to display any text ingame and the rest, i want to test myself. to learn it.
DJ_Mic is offline

Reply With Quote

Old 09-02-2010, 11:32 AM   #18
◄ Super Moderator ►

Hanoi22's Avatar

Join Date: Dec 2009
Posts: 3,197
Reputation: 81923
Rep Power: 909
Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!Hanoi22 has a huge epeen!
Fire At Will Champion Hot Pepper vs The Water Champion Krabbyball Champion If Pigs Can Fly Champion Muay Thai Champion Tadpole Champion Jumping Nutty Champion Blood Shed Champion Badger Racing Champion
Points: 55,908, Level: 35
Points: 55,908, Level: 35 Points: 55,908, Level: 35 Points: 55,908, Level: 35
Activity: 100.0%
Activity: 100.0% Activity: 100.0% Activity: 100.0%
Last Achievements
Award-Showcase
Quote:
Originally Posted by Shad0w_ View Post
'sprintf' is not a drawing function.



Calling a Messagebox function like this in endscene for FPS clocking would be retarded.
Indeed but easy to check out if the fps works wihout drawtext.
But anyway simple posted whole code so read that and try to understand it, and you get it, good luck.
Hanoi22 is offline

Reply With Quote

Old 09-02-2010, 12:50 PM   #19
Retired Admin

learn_more's Avatar

Join Date: Sep 2006
Posts: 5,249
Reputation: 93628
Rep Power: 1106
learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!learn_more has a huge epeen!
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (2)
sieg heil Nazi
Points: 70,490, Level: 39
Points: 70,490, Level: 39 Points: 70,490, Level: 39 Points: 70,490, Level: 39
Activity: 24.7%
Activity: 24.7% Activity: 24.7% Activity: 24.7%
Last Achievements
Award-Showcase
Tatez, this is an international forum, please stick to english.

ps: your dutch is really bad....
__________________
learn_more is offline

Reply With Quote

Old 09-02-2010, 02:41 PM   #20
Donator

ZeaS's Avatar

Join Date: May 2008
Location: Germany
Posts: 251
Reputation: 18729
Rep Power: 239
ZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UCZeaS Will always be a legend at UC
Recognitions:
Members who have contributed financial support towards UnKnoWnCheaTs. Donation (12)
Awarded to members who have donated 10 times or more. Gratuity (1)
Points: 13,610, Level: 15
Points: 13,610, Level: 15 Points: 13,610, Level: 15 Points: 13,610, Level: 15
Activity: 19.5%
Activity: 19.5% Activity: 19.5% Activity: 19.5%
Last Achievements
Quote:
Originally Posted by DJ_Mic View Post
@SimPle01:
I tried it, and it doenst work!

@all: i dont want an c&p code! i only want a sample how to display/draw a text ingame, and the rest i want to learn. You mustnt show me a sample of the frames. Only how to display any text ingame and the rest, i want to test myself. to learn it.
are you sure that you're hooking correctly? or checked if the anticheat removed your hook? check the bytes or add a messagebox and test it
__________________

ZeaS is online now

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
fps, shown
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 09:08 AM.