I asked for the Ammo HUD

Azra3l
04-25-2003, 12:49 AM
aka the ammo count that goes beneath your ret ala Evitas pack, though I'm using presto... and was given the text below. wtf do i do with it?





HUD::new("AmmoHUD","AmmoHUD::Update","50% 50%+32 22 16");
HUD::Display("AmmoHUD",true);

function AmmoHUD::Update(%hud) {
%weapon = getMountedItem(0);
if(%weapon == 13)
%ammo = "Bullet";
else if(%weapon == 15)
%ammo = "Plasma Bolt";
else if(%weapon == 17)
%ammo = "Grenade Ammo";
else if(%weapon == 19)
%ammo = "Mortar Ammo";
else if(%weapon == 21)
%ammo = "Disc";
else
%Ammo = "None";
if(%ammo == "None")
%ammo = "~";
else
%ammo = getItemCount(%ammo);

HUD::SetText("AmmoHUD","<f2"> @ %ammo);
return "0.3";
}

cyclonite
04-25-2003, 01:47 AM
Open up notepad, paste all the text in there


HUD::new("AmmoHUD","AmmoHUD::Update","50% 50%+32 22 16" );
HUD::Display("AmmoHUD",true);

function AmmoHUD::Update(%hud) {
%weapon = getMountedItem(0);
if(%weapon == 13)
%ammo = "Bullet";
else if(%weapon == 15)
%ammo = "Plasma Bolt";
else if(%weapon == 17)
%ammo = "Grenade Ammo";
else if(%weapon == 19)
%ammo = "Mortar Ammo";
else if(%weapon == 21)
%ammo = "Disc";
else
%ammo = "None";
if(%ammo == "None" )
%ammo = "~";
else
%ammo = getItemCount(%ammo);

HUD::SetText("AmmoHUD","<f2>" @ %ammo);
return "0.3";
}

Thats the code WITHOUT smilies...AND I fixed a typo.

After you have pasted it into notepad save it as ammohud.cs and save it in your config folder.
Then open you autoexec.cs file in the config folder and add the following line to the END of the file:
exec("ammohud.cs");

That should work.