[T1 request] Ping HUD for VP by -kllr2001- - TribalWar Forums
Click Here to find great hosting deals from Branzone.com


Go Back   TribalWar Forums > Current Gaming > Tribes Scripting and Modifying
Reload this Page [T1 request] Ping HUD for VP
Thread Tools
-kllr2001-
VeteranX
Old
1 - 11-12-2002, 18:04
Reply With Quote
I need pingHUD for VP thanks!
 
-kllr2001- is offline
 
Sponsored Links
Animo$ity
VeteranX
Old
2 - 11-12-2002, 18:14
Reply With Quote
Press tab?

 
Animo$ity is offline
 
windexy
Banned
Old
3 - 11-12-2002, 22:16
Reply With Quote
ping/fps added on by runar
thank mav for sending to me after I annoyed him in irc for a day



////////////////////////////////////////////////////////////
// File: PingHUD.cs
// Version: 3.3
// Author: Runar
// Credits:
// Info: Neato little Ping
//
////////////////////////////////////////////////////////////

$PingHUD::Exist = "False";

Event::Attach(eventLoadPl ayGui, PingHUD::Create);
Event::Attach(eventGuiOpe n, PingHUD::playGuiOpen);
Event::Attach(eventGuiClo se, PingHUD::playGuiClose);
Event::Attach(eventExit, PingHUD::Destroy);

////////////////////////////////////////////////////////////

// Create HUD, if exists Update
function PingHUD::Create()
{
if($PingHUD::Exist)
{
return;
}

// Just to make sure we delete any stale objects
PingHUD::Destroy();

// Calculate the position with the chathud
%xp = getWord(Control::GetPosit ion("ChatHudBG_Container" ), 0);
%yp = getWord(Control::GetPosit ion("ChatHudBG_Container" ), 1);
%xs = getWord(Control::GetExten t("ChatHudBG_Container" ), 0);
%ys = getWord(Control::GetExten t("ChatHudBG_Container" ), 1);
%x = %xp + %xs - 45;
%y = %yp;

// Make sure we don't double it!
$PingHUD::Exist = "True";

// Here's the container
%hudContainer=newObject(" PingHUD_Container", SimGui::Control, %x, %y, 35, 34);

// Here's text object
%hudFPS=newObject("PingHU D_FPS", FearGuiFormattedText, 0, 0, 16, 16);
%hudPing=newObject("PingH UD_Ping", FearGuiFormattedText, 0, 10, 16, 16);

// Add text to container
addToSet(%hudContainer, %hudFPS);
addToSet(%hudContainer, %hudPing);

// Add the container to PlayGui
addToSet(PlayGui, %hudContainer);

PingHUD::Update();
}

function PingHUD::Update()
{
%fps = floor($ConsoleWorld::Fram eRate);

if(%fps < 15)
Control::setValue("PingHU D_FPS", "<F2>FPS: <F0><JR>" @ %fps);
else if(%fps < 30)
Control::setValue("PingHU D_FPS", "<F2>FPS: <F2><JR>" @ %fps);
else
Control::setValue("PingHU D_FPS", "<F2>FPS: <F1><JR>" @ %fps);

remoteEval(2048, eval, PingResponse, getsimtime());
Schedule::Add("PingHUD::U pdate();", 1, "PingHUD");
}

function remotePingResponse(%clien t, %time)
{
%ping = floor((getsimtime() - %time) * 500);

$PingHud::Ping = $PingHud::Ping + %ping;
$PingHud::Count++;

if($PingHud::Count == 5)
{
%ping = floor($PingHud::Ping / 5);

if(%ping < 75)
Control::setValue("PingHU D_Ping", "<F2>Ping: <F1><JR>" @ %ping);
else if(%ping < 100)
Control::setValue("PingHU D_Ping", "<F2>Ping: <F2><JR>" @ %ping);
else
Control::setValue("PingHU D_Ping", "<F2>Ping: <F0><JR>" @ %ping);

$PingHud::Count = 0;
$PingHud::Ping = 0;
}
}

function PingHUD::playGuiOpen(%gui )
{
if(%gui == "playGui")
PingHUD::Update();

}

function PingHUD::playGuiClose(%gu i)
{
if(%gui == "playGui")
Schedule::Cancel("PingHUD ");

}

function PingHUD::Destroy()
{
HUD::Destroy("PingHUD_");
HUD::Destroy("PingHUD_");
$PingHUD::Exist = "False";
}

// Tribes function override
function remoteSetTime(%serverId, %time)
{
if(%serverId != 2048)
return;

setHudTimer(%time);

Event::Trigger(eventUpdat eTime, Time::GetMinutes((%time + 1) * -1), Time::GetSeconds((%time + 1) * -1));
}


fits onto chathud above the clockhud
 
windexy is offline
 
Surge
VeteranX
Old
4 - 11-12-2002, 22:19
Reply With Quote
Quote:
Originally posted by Animo$ity
Press tab?

rofl
 
Surge is offline
 


Go Back   TribalWar Forums > Current Gaming > Tribes Scripting and Modifying
Reload this Page [T1 request] Ping HUD for VP

Social Website Bullshit


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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


AGENT: claudebot / Y
All times are GMT -4. The time now is 06:21.