[Tutorial] SHOW FPS AND PING INGAME

Socius Decennalis
Decennium
Joined
Oct 22, 2013
Messages
430
Reaction score
182
this is a nice easy tutorial to show your fps and ping ingame

open warz.sln and look for

Code:
if(NetworkLocal && gClientLogic().localPlayer_)
    {
        // show a warning if FPS or PING is low
        float fps = r3dGetAvgFPS();
        if(fps < 20.0f)
            Font_Label->PrintF(r3dRenderer->ScreenW-80, 0, r3dColor(243,43,37), "FPS: %.1f", fps);
    }

change it for


Code:
if(NetworkLocal && gClientLogic().localPlayer_)
    {
        // show a warning if FPS or PING is low
        /*if(fps < 20.0f)*/
        Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 0, r3dColor(243,43,37), "FPS: %.1f", r3dGetAvgFPS());
        if(gClientLogic().net_->lastPing_ > 50)
            Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 15, r3dColor(255,0,0), "PING: %i", gClientLogic().net_->lastPing_);
        else Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 15, r3dColor(0,255,68), "PING: %i", gClientLogic().net_->lastPing_);
    }

ping - [Tutorial]  SHOW FPS AND PING INGAME - RaGEZONE Forums

remember if this helps you hit that like button
 
i beleave it will work fine on the dnc scr as im useing my own scr so cant test on the dnc but if it dont work make a post in the help part of the forum and i will do my best to help you
 
I made this code there, only appears when you press TAB, but for some reason it some time, you can fix?

Code:
if(NetworkLocal && gClientLogic().localPlayer_)
    {
       [COLOR=#ff0000]if (GetAsyncKeyState(VK_TAB) & 0)[/COLOR]
         [COLOR=#ff0000]{[/COLOR]
            Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 0, r3dColor(15,175,35), "FPS: %.1f",                 r3dGetAvgFPS());
            if(gClientLogic().net_->lastPing_ > 50)
                Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 15, r3dColor(15,175,35), "PING: %i", 
        gClientLogic().net_->lastPing_);
            else Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 15, r3dColor(215,15,15), "PING: %i",             gClientLogic().net_->lastPing_);
    [COLOR=#ff0000] }[/COLOR]
    }
 
Last edited:
How to change ping&fps display space to the left side ?
 
Code:
Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 0, r3dColor(243,43,37), "FPS: %.1f", r3dGetAvgFPS());
if(gClientLogic().net_->lastPing_ > 50)
   Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 15, r3dColor(255,0,0), "PING: %i", gClientLogic().net_->lastPing_);
else Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 15, r3dColor(0,255,68), "PING: %i", gClientLogic().net_->lastPing_);

(r3dRenderer->ScreenW) / 2, 0 <-- X, Y (X = Left, Y = Top)
 
Back