filtermsg for evita?

DonnyDaJackel
09-05-2004, 12:57 PM
was there ever a filtermsg (deathhud) for evitas scripts. i could only find the stripped version and it wont work properly with evitas it gives me a bunch of syntax errors and stuff.


plz help

DonnyDaJackel
09-05-2004, 01:53 PM
so far iv done this


// ========================= ========================= ========================
// User Config Section
// ========================= ========================= ========================= =
$DH::Top = "200";
$DH::Left = "0";

// How to display HUD
$DHPref::Transparent = "TRUE";

// How many lines is the hud
$DHPref::Lines = "5";

// Menu Key
$DHPref::MenuKey = "alt d";
// ========================= ========================= ========================


// ========================= ========================= ========================
// Scripting Section
// ========================= ========================= ========================

Event::Attach(EventPlayGu iCreated,DH::Create);
Event::Attach(EventExit,D H::OnExit);

Event::Attach(eventGuiOpe n, DH::Create);
Event::Attach(eventGuiClo se, DH::OnExit);
Event::Attach(eventExit, DH::OnExit);

Event::Attach(EventKillTr ak,DH::OnKillTrak);

if (IsFile("Config\\DeathHudPrefs.cs"))
exec("DeathHudPrefs.cs");

if ($DHPref::Width == "")
$DHPref::Width = 300;

if ($DHPref::Height == "")
$DHPref::Height = 72;

function DH::Create()
{
$DH::Cont = newObject(DeathHud,SimGui ::Control,$DH::Left,$DH:: Top,$DHPref::Width,$DHPre f::Height);
$DH::BG = newObject(DeathHud_BG,Fea rGui::FearGuiMenu,0,0,$DH Pref::Width,$DHPref::Heig ht);
$DH::Text = newObject(DeathHud_Text, FearGuiFormattedText, 5, -1, 1000, 1000);

if(!$DHPref::Transparent)
addToSet($DH::Cont,$DH::B G);
addToSet($DH::Cont,$DH::T ext);
addToSet(PlayGui,$DH::Con t);
}

// Track kills
function DH::OnKillTrak(%killer,%v ictim,%weapon)
{
for (%i=1;%i<$DHPref::Lines;%i++)
{
$DH::Row[%i] = $DH::Row[%i+1];
}
%kname = DH::Replace(Client::GetNa me(%killer),"<","<<");
%vname = DH::Replace(Client::GetNa me(%victim),"<","<<");
if (Client::GetTeam(%killer) ==$MyTeam)
%kname = "<F1>"@%kname;
else
%kname = "<F0>"@%kname;
if (Client::GetTeam(%victim) ==$MyTeam)
%vname = "<F1>"@%vname;
else
%vname = "<F0>"@%vname;
$DH::Row[$DHPref::Lines] = %kname@"<F2> --> "@%vname@" <F2>: "@%weapon;
DH::Update();
return "FALSE";
}

// Improved String Replace function
function DH::replace(%string, %search, %replace)
{
while ((%idx=String::FindSubStr (%string,%search))!=-1)
{
%left = %left @ String::GetSubStr(%string ,0,%idx) @ %replace;
%string = String::GetSubStr(%string ,%idx+String::Len(%search ),String::Len(%string));
}
%left = %left @ %string;
return %left;
}


function DH::Update()
{
for (%i=1;%i<=$DHPref::Lines;%i++)
%display = %display @ escapestring($DH::Row[%i]) @ "\n";
Control::SetValue(DeathHu d_Text, %display);
}


function DH::OnExit()
{
removeFromSet(PlayGui,$DH ::Cont);
deleteObject($DH::Cont);
// export("DHPref::*","config\\DeathHudPrefs.cs");
}


but it doesnt show names and the killmsgs are still in the chathud

SuperSlug
09-05-2004, 04:13 PM
You have a lot of syntax errors and you haven't muted the kill messages.

DonnyDaJackel
09-05-2004, 04:21 PM
how does one mute the killmsgs?

SuperSlug
09-05-2004, 07:05 PM
Just return mute all of the kill messages.

DonnyDaJackel
09-05-2004, 07:28 PM
i have no idea how to do that

DonnyDaJackel
09-08-2004, 01:29 AM
bump :/

DonnyDaJackel
09-08-2004, 06:13 PM
this is what i got now, displays names but doesnt mute death msgs and the colors for the names are a bit off


// ========================= ========================= ========================
// File: DeathHud.cs
// Author: Bryan "daerid" Ross
// Date: 3/7/2001
// Notes: Basically a SplitMsg style hud, but all text based.
//
// Version: S1.0 (S is for Stripped)
//
// ========================= ========================= ========================
$myteam = client::getteam(getmanage rid());


// ========================= ========================= ========================
// User Config Section
// ========================= ========================= ========================= =
$DH::Top = "400";
$DH::Left = "5";

// How to display HUD
$DHPref::Transparent = "TRUE";

// How many lines is the hud
$DHPref::Lines = "5";

// Menu Key
$DHPref::MenuKey = "alt d";
// ========================= ========================= ========================


// ========================= ========================= ========================
// Scripting Section
// ========================= ========================= ========================

Event::Attach(eventGuiOpe n, DH::Create);
Event::Attach(eventGuiClo se, DH::OnExit);
Event::Attach(eventExit, DH::OnExit);

Event::Attach(EventKillTr ak,DH::OnKillTrak);

if (IsFile("Config\\DeathHudPrefs.cs"))
exec("DeathHudPrefs.cs");

if ($DHPref::Width == "")
$DHPref::Width = 300;

if ($DHPref::Height == "")
$DHPref::Height = 72;

function DH::Create()
{
$DH::Cont = newObject(DeathHud,SimGui ::Control,$DH::Left,$DH:: Top,$DHPref::Width,$DHPre f::Height);
$DH::BG = newObject(DeathHud_BG,Fea rGui::FearGuiMenu,0,0,$DH Pref::Width,$DHPref::Heig ht);
$DH::Text = newObject(DeathHud_Text, FearGuiFormattedText, 5, -1, 1000, 1000);

if(!$DHPref::Transparent)
addToSet($DH::Cont,$DH::B G);
addToSet($DH::Cont,$DH::T ext);
addToSet(PlayGui,$DH::Con t);
}

// Track kills
function DH::OnKillTrak(%killer,%v ictim,%weapon)
{
for (%i=1;%i<$DHPref::Lines;%i++)
{
$DH::Row[%i] = $DH::Row[%i+1];
}
%kname = %killer;
%vname = %victim;
if (Client::GetTeam(%killer) ==$MyTeam)
%kname = "<F1>"@%kname;
else
%kname = "<F0>"@%kname;
if (Client::GetTeam(%victim) ==$MyTeam)
%vname = "<F1>"@%vname;
else
%vname = "<F0>"@%vname;
$DH::Row[$DHPref::Lines] = %kname@" "@%weapon@" --> "@%vname;
DH::Update();
return "false";
}

// Improved String Replace function
function DH::replace(%string, %search, %replace)
{
while ((%idx=String::FindSubStr (%string,%search))!=-1)
{
%left = %left @ String::GetSubStr(%string ,0,%idx) @ %replace;
%string = String::GetSubStr(%string ,%idx+String::Len(%search ),String::Len(%string));
}
%left = %left @ %string;
return %left;
}


function DH::Update()
{
for (%i=1;%i<=$DHPref::Lines;%i++)
%display = %display @ escapestring($DH::Row[%i]) @ "\n";
Control::SetValue(DeathHu d_Text, %display);
}


function DH::OnExit()
{
removeFromSet(PlayGui,$DH ::Cont);
deleteObject($DH::Cont);
// export("DHPref::*","config\\DeathHudPrefs.cs");
}