need simple flag hud by libra - 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 need simple flag hud
Thread Tools
libra
VeteranXX
Old
1 - 03-24-2015, 11:17
Reply With Quote
it somewhere out there plz help
 
libra is offline
 
Sponsored Links
Xml V2.0
VeteranXV
Old
2 - 03-24-2015, 11:32
Reply With Quote
Like this?

 
Xml V2.0 is offline
 
Milk-Man
VeteranXX
Old
3 - 03-24-2015, 12:19
Reply With Quote
Yes like that
 
Milk-Man is offline
 
Xml V2.0
VeteranXV
Old
4 - 03-24-2015, 12:55
Reply With Quote
Code:
$CtfHUD::Image[0, home] = "friendly.home.png";
$CtfHUD::Image[0, player] = "friendly.player.png";
$CtfHUD::Image[0, field] = "friendly.empty.png";

$CtfHUD::Image[1, home] = "enemy.home.png";
$CtfHUD::Image[1, player] = "enemy.player.png";
$CtfHUD::Image[1, field] = "enemy.empty.png";

function CtfHUD::Init() {
	if ( $CtfHUD::Loaded )
		return;
	$CtfHUD::Loaded = true;
	
//	HUD::New::Shaded("CtfHUD::Container", 5, 80, 175, 40, CtfHUD::Wake, CtfHUD::Sleep);
	HUD::New("CtfHUD::Container", 0, 0, 176, 46, CtfHUD::Wake, CtfHUD::Sleep);
	
	newObject("CtfHUD::BG_IMG", FearGuiFormattedText, 0, 0, 174, 44); 
	newObject("CtfHUD::Image0", FearGuiFormattedText, 3, 3, 20, 20); 
	newObject("CtfHUD::Image1", FearGuiFormattedText, 3, 23, 20, 20);

	newObject("CtfHUD::Status0", FearGuiFormattedText, 25, 3, 150, 20); 
	newObject("CtfHUD::Status1", FearGuiFormattedText, 25, 23, 150, 20);

	HUD::Add("CtfHUD::Container", "CtfHUD::BG_IMG");
	HUD::Add("CtfHUD::Container", "CtfHUD::Image0");
	HUD::Add("CtfHUD::Container", "CtfHUD::Image1");
	
	HUD::Add("CtfHUD::Container", "CtfHUD::Status0");
	HUD::Add("CtfHUD::Container", "CtfHUD::Status1");

	CtfHUD::Reset();
}

function CtfHUD::Wake() { CtfHUD::Update(); }
function CtfHUD::Sleep() { }

function CtfHUD::Reset() {
	Control::SetValue("CtfHUD::BG_IMG", "<b0,2:Modules/CTFHud/ctfhudtrans.png>");
	Control::SetValue("CtfHUD::Image0", "<b3,3:Modules/CTFHud/friendly.home.png>");
	Control::SetValue("CtfHUD::Image1", "<b3,4:Modules/CTFHud/enemy.home.png>");

	CtfHUD::Update();
}

function CtfHUD::Update() {
	//friendly team goes in slot 0
	CtfHUD::SetTeamValue( 0, Team::Friendly() );
	//enemy team goes in slot 0
	CtfHUD::SetTeamValue( 1, Team::Enemy() );
}


function CtfHUD::SetTeamValue( %slot, %team ) {
	%score = Team::Score(%team);
	%loc = Team::Flag::Location(%team);
	
	switch ( %loc ) {
		case "home":
			%loc = "<f3><-";
			%bmp = $CtfHUD::Image[%slot, "home"];
			break;
		case "field":
			%loc = "<f3>-> <f2>" ~ Team::Flag::Timer(%team);
			%bmp = $CtfHUD::Image[%slot, "field"];
			break;
		default:
			%loc = "<f2>" ~ String::escapeFormatting(Client::GetName(%loc));
			%bmp = $CtfHUD::Image[%slot, "player"];
			break;
	}
	
	Control::SetValue( "CtfHUD::Image"~%slot, "<b3,3:Modules/CTFHud/"~%bmp~">" );
	Control::SetValue( "CtfHUD::Status"~%slot, "<f3><f2>"~%score~"<f3>  "~%loc );

}

// if we change teams, the sides may need to be updated
function CtfHUD::SelfUpdate( %client, %team ) {
	if ( %client == getManagerId() )
		CtfHUD::Update();
}

Event::Attach( EventFlagUpdate, CtfHUD::Update );
Event::Attach( EventFlagTimerUpdate, CtfHUD::Update );
Event::Attach( EventClientChangeTeam, CtfHUD::SelfUpdate );

CtfHUD::Init();
 
Xml V2.0 is offline
 


Go Back   TribalWar Forums > Current Gaming > Tribes Scripting and Modifying
Reload this Page need simple flag hud

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 11:21.