Code:
Dinerillo()
{
self endon("disconnect");
self endon("death");
self.dinero = 0;
if(!isDefined(self.dineroS))
{
self.dineroS = self createFontString( "objective", 2 );
self.dineroS setPoint( "", "",260,-190);
}
self thread Destruirhud(self.dineroS);
self thread Destruirhudr(self.dineroS);
while(1)
{
self.dineroS setText("Cash:" + self.dinero);
wait 0.15;
}
}
Pantalla()
{
self endon("disconnect");
self endon("death");
wait 0.1;
if(!isDefined(self****nda))
{
self****nda = self createFontString( "objective", 2 );
self****nda setPoint( "", "",260,-165);
}
self thread Destruirhud(self****nda);
self thread Destruirhudr(self****nda);
self thread BarradeVida();
self thread ContadorMunicion();
self thread Informacion();
while(1)
{
self****nda setText("Round:" + level.ola);
wait 0.15;
}
}
ContadorMunicion()
{
if(!isDefined(self.Blood))
{
self.Blood = createIcon("cardtitle_bloodsplat", 150, 32);
self.Blood setPoint( "", "", 260, -190);
}
self thread Destruirhud(self.Blood);
self thread Destruirhudr(self.Blood);
if(!isDefined(self.ZombiHud))
{
self.ZombiHud = createIcon("cardtitle_zombie_3", 150, 28);
self.ZombiHud setPoint( "", "", 260, -160);
}
self thread Destruirhud(self.ZombiHud);
self thread Destruirhudr(self.ZombiHud);
if(!isDefined(self.ammoBoard))
{
self.ammoBoard = self createFontString( "default", 2 );
self.ammoBoard setPoint( "", "", 250, -115);
}
self thread Destruirhud(self.ammoBoard);
self thread Destruirhudr(self.ammoBoard);
if(!isDefined(self.stockBoard))
{
self.stockBoard = self createFontString( "default", 2 );
self.stockBoard setPoint( "", "", 289, -115);
}
self thread Destruirhud(self.stockBoard);
self thread Destruirhudr(self.stockBoard);
if(!isDefined(self.ammoBoard3))
{
self.ammoBoard3 = self createFontString( "default", 2 );
self.ammoBoard3 setPoint( "", "", 270, -115);
self.ammoBoard3 setText("/");
}
self thread Destruirhud(self.ammoBoard3);
self thread Destruirhudr(self.ammoBoard3);
while(1)
{
self.Clip = self getWeaponAmmoClip(self getCurrentWeapon());
self.Stock = self getWeaponAmmoStock(self getCurrentWeapon());
self.ammoBoard setValue(self.Clip);
self.stockBoard setValue(self.Stock);
if(self getWeaponAmmoClip(self getCurrentWeapon()) <= 5)
{
self.ammoBoard.color = (1,0,0);
}
else
{
self.ammoBoard.color = (255, 255, 255);
}
if(self getWeaponAmmoStock(self getCurrentWeapon()) <= 5)
{
self.stockBoard.color = (1,0,0);
}
else
{
self.stockBoard.color = (255, 255, 255);
}
wait 0.1;
}
}
BarradeVida()
{
self.useBar = createPrimaryProgressBar( -250 );
self.useBar.bar.x = 200;
self.useBar.x = 260;
self.useBar.bar.y = -135;
self.useBar.y = -135;
for(;;)
{
self.usebar updateBar( self.health/100, 100 );
if(self.health < 75 && self.health < 50 != true)
{
self.usebar.color = (0,0,0);
self.usebar.bar.color = (0.3,0,1);
self.usebar.alpha = 0.5;
}
else if(self.health < 50 && self.health > 25)
{
self.usebar.color = (0,0,0);
self.usebar.bar.color = (0.9,0,1);
self.usebar.alpha = 1;
self shellshock("death",2);
}
else if(self.health < 50)
{
self.usebar.color = (0,0,0);
self.usebar.bar.color = (1,0,0);
self.usebar.alpha = 0.5;
}
else if(self.health > 75)
{
self.usebar.color = (0,0,0);
self.usebar.bar.color = (0,0,1);
self.usebar.alpha = 0.5;
}
wait 0.05;
}
}
like this