- Joined
- Jan 19, 2014
- Messages
- 136
- Reaction score
- 126
Hello RageZone! First of all sorry if you have any English errors I'm using google translator.
In this tutorial you will learn about that FPS and PING in the style of src UNITED...
In 3 steps src game, flash game and script game...
Step 1
WarZ.sln
Search for:
Change all code for this:
Search for this now:
Add above:
now search for:
Add above
FLASH PART
HUD.as
Search for:
Add before:
In Main.as
Now search for
Add before
Create action script in WARZ_HUD.fla
Credits create CODE Alexx VERMELHO
Credits decode HUD and SCRIPTs ME!!!
TheLiciaZ FOREVER!!!
In this tutorial you will learn about that FPS and PING in the style of src UNITED...
In 3 steps src game, flash game and script game...
Step 1
WarZ.sln
Search for:
Code:
if(NetworkLocal && gClientLogic().localPlayer_)
{
Code:
if(NetworkLocal && gClientLogic().localPlayer_) // TheLiciaZ CORP
{
if(gClientLogic().net_->lastPing_ > 0)
Font_Label->PrintF((r3dRenderer->ScreenW) / 2, 0, r3dColor(255,0,0), "PING: %i", gClientLogic().net_->lastPing_);
if (r_render_in_game_HUD->GetBool() && hudPause && !hudPause->isActive())//do not show FPS: and PING: if HUD disabled
{
float fps = r3dGetAvgFPS();
hudMain->showPingFPS(gClientLogic().net_->lastPing_, int(fps));
}
}
Search for this now:
Code:
void HUDDisplay::addChatMessage(int tabIndex, const char* user, const char* text, uint32_t flags)
Add above:
Code:
void HUDDisplay::showPingFPS(int valueping, int valuefps) // TheLiciaZ CORP
{
if (!Inited) return;
//PING
int Ping = valueping;
bool pingnormal = Ping < 100;
bool pinglow = (Ping > 100 && Ping < 200);
bool pinghight = Ping > 200;
char PingStr[64] = { 0 };
if (pingnormal)
sprintf(PingStr, "<font color=\"#FFFFFF\">%d</font>", valueping);
else if (pinglow)
sprintf(PingStr, "<font color=\"#FF9900\">%d</font>", valueping);
else if (pinghight)
sprintf(PingStr, "<font color=\"#CC0000\">%d</font>", valueping);
//FPS
float fps = r3dGetAvgFPS();
bool fpsvaluemax = fps > 40.0f;
bool fpsvaluemed = (fps > 20.0f && fps < 40.0f);
bool fpsvaluemin = fps < 20.0f;
char FpsStr[64] = { 0 };
if (fpsvaluemax)
sprintf(FpsStr, "<font color=\"#FFFFFF\">%d</font>", valuefps);
else if (fpsvaluemed)
sprintf(FpsStr, "<font color=\"#FF9900\">%d</font>", valuefps);
else if (fpsvaluemin)
sprintf(FpsStr, "<font color=\"#CC0000\">%d</font>", valuefps); // TheLiciaZ CORP
Scaleform::GFx::Value var[2];
var[0].SetString(PingStr);
var[1].SetString(FpsStr);
gfxHUD.Invoke("_root.api.showPingFPS", var, 2);
}
now search for:
Code:
void setBloodAlpha(float alpha);
Add above
Code:
void showPingFPS(int valueping, int valuefps); // TheLiciaZ CORP
FLASH PART
HUD.as
Search for:
Code:
public function setPlayerListContextMenuButton(id:int, name:String, actionID:int)
Add before:
Code:
public function showPingFPS(PingStr:String, FpsStr:String) // TheLiciaZ CORP
{
Main.PingFps.PING.htmlText = "PING: " + PingStr;
Main.PingFps.FPS.htmlText = "FPS: " + FpsStr;
}
In Main.as
Now search for
Code:
public var api:warz.hud.HUD = null;
Add before
Code:
public var PingFps:MovieClip; // TheLiciaZ CORP
Create action script in WARZ_HUD.fla
Credits create CODE Alexx VERMELHO
Credits decode HUD and SCRIPTs ME!!!
TheLiciaZ FOREVER!!!