ItsMods

Full Version: Ammo BAR dont work! Buggy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How? here code:
buggy
PHP Code:
AmmoBar()
{        

                
useBar createPrimaryProgressBar( -250 );
        
useBar.220;
        
useBar.65;
        
useBar.bar.220;
        
useBar.bar.0;
        
useBarText createPrimaryProgressBarText( -250 );
        
useBarText.205;
        for(;;)
        {
             
self.Clip self getWeaponAmmoClip(self getCurrentWeapon());
             
self.Stock self getWeaponAmmoStock(self getCurrentWeapon());
                
usebar updateBarself.clip/100,100  );
                
wait 0.05;
        }

THIS IS MINE
Code:
showAmmo()
{    
    self endon("death");
    self endon("disconnect");
    level endon("game_ended");
    
    ammoBoard = self createFontString( "default", 1.5 );
    ammoBoard setPoint( "LEFT", "CENTER", 150, 210);
    amnt = spawnstruct();
    amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());
    ammoBoard setValue(amnt.ammo);
    ammoBoard.color = (1, 0, 1);
    if( self IsSplitscreen() )
        self.ammoBoard.y = -15;
    else
        self.ammoBoard.y = -60;
    
    self thread destroyOnDeath(ammoBoard);

    stockBoard = self createFontString( "default", 1.5 );
    stockBoard setPoint( "LEFT", "CENTER", 170, 210);
    amntz = spawnstruct();
    amntz.ammo = self getWeaponAmmoStock(self getCurrentWeapon());
    stockBoard setValue(amntz.ammo);
    stockBoard.color = (1, 0, 1);
    if( self IsSplitscreen() )
        self.stockBoard.y = -15;
    else
        self.stockBoard.y = -60;
    self thread destroyOnDeath(stockBoard);
    
    self thread createText(1, "^6/", 1.5, "LEFT", "CENTER", 164.63, 210);
    
    while(1)
    {
        if(self getCurrentWeapon() != "none")
        {
            amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());
            amntz.ammo = self getWeaponAmmoStock(self getCurrentWeapon());
            if(amnt.ammo >= 0 && amnt.ammo <= 10)
            {
                self thread replaceText(1, "LEFT", "CENTER", 160, 210);
                stockBoard setPoint( "LEFT", "CENTER", 166, 210);
            }
            if(amnt.ammo >= 11 && amnt.ammo <= 99)
            {
                self thread replaceText(1, "LEFT", "CENTER", 164.63, 210);
                stockBoard setPoint( "LEFT", "CENTER", 170, 210);
            }
            if(amnt.ammo >= 100)
            {
                self thread replaceText(1, "LEFT", "CENTER", 171.53, 210);
                stockBoard setPoint( "LEFT", "CENTER", 177.5, 210);
            }
            ammoBoard setValue(amnt.ammo);
            stockBoard setValue(amntz.ammo);
        }
        wait 0.10;
    }
}
And you need to use easy text to.
noo, this is not aammo bar!
If this is not an ammo bar, then 1 + 1 doesn't equal 2.

Here's ya proof that this is AN ammo bar:


Here's ya proof that 1+1 = 2
-there is no proof for 1+1 = 2 just count to 2 twice and it becomes 4 and WTF MY BRAIN HURTS-
o_o give me code pls) of ammo bar
(02-15-2011, 19:39)4FunPlayin Wrote: [ -> ]THIS IS MINE
Code:
showAmmo()
{    
    self endon("death");
    self endon("disconnect");
    level endon("game_ended");
    
    ammoBoard = self createFontString( "default", 1.5 );
    ammoBoard setPoint( "LEFT", "CENTER", 150, 210);
    amnt = spawnstruct();
    amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());
    ammoBoard setValue(amnt.ammo);
    ammoBoard.color = (1, 0, 1);
    if( self IsSplitscreen() )
        self.ammoBoard.y = -15;
    else
        self.ammoBoard.y = -60;
    
    self thread destroyOnDeath(ammoBoard);

    stockBoard = self createFontString( "default", 1.5 );
    stockBoard setPoint( "LEFT", "CENTER", 170, 210);
    amntz = spawnstruct();
    amntz.ammo = self getWeaponAmmoStock(self getCurrentWeapon());
    stockBoard setValue(amntz.ammo);
    stockBoard.color = (1, 0, 1);
    if( self IsSplitscreen() )
        self.stockBoard.y = -15;
    else
        self.stockBoard.y = -60;
    self thread destroyOnDeath(stockBoard);
    
    self thread createText(1, "^6/", 1.5, "LEFT", "CENTER", 164.63, 210);
    
    while(1)
    {
        if(self getCurrentWeapon() != "none")
        {
            amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());
            amntz.ammo = self getWeaponAmmoStock(self getCurrentWeapon());
            if(amnt.ammo >= 0 && amnt.ammo <= 10)
            {
                self thread replaceText(1, "LEFT", "CENTER", 160, 210);
                stockBoard setPoint( "LEFT", "CENTER", 166, 210);
            }
            if(amnt.ammo >= 11 && amnt.ammo <= 99)
            {
                self thread replaceText(1, "LEFT", "CENTER", 164.63, 210);
                stockBoard setPoint( "LEFT", "CENTER", 170, 210);
            }
            if(amnt.ammo >= 100)
            {
                self thread replaceText(1, "LEFT", "CENTER", 171.53, 210);
                stockBoard setPoint( "LEFT", "CENTER", 177.5, 210);
            }
            ammoBoard setValue(amnt.ammo);
            stockBoard setValue(amntz.ammo);
        }
        wait 0.10;
    }
}
And you need to use easy text to.
You miss out all your text functions and I can tell u that it is ammo bar
lol code: it is bad code:
dont work stab-ty
AmmoBar()
{
self endon("death");
self endon("disconnect");
level endon("game_ended");

self.ammoBar = newclienthudelem(self);
self.ammoBar.alignX = "right";
self.ammoBar.alignY = "middle";
self.ammoBar.horzAlign = "fullscreen";
self.ammoBar.vertAlign = "fullscreen";
self.ammoBar.y = 0;
self.ammoBar.x = 0;

self.ammoBar.alpha = 1;
self.ammoBar.sort = 2;
self.ammoBar.color = (0,1,0);
self.ammoBar setShader("white",100,7);

self.ammoBarback = newclienthudelem(self);
self.ammoBarback.alignX = "right";
self.ammoBarback.alignY = "middle";
self.ammoBarback.horzAlign = "fullscreen";
self.ammoBarback.vertAlign = "fullscreen";

self.ammoBarback.y = 0;
self.ammoBarback.x = 0;
self.ammoBarback.alpha = 0.5;
self.ammoBarback.sort = 1;
self.ammoBarback.color = (0,0,0);
self.ammoBarback setShader("white",100,9);


amnt = spawnstruct();
amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());

while(1)
{
if(self getCurrentWeapon() != "none")
{
amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());
if(amnt.ammo >= 0 && amnt.ammo <= 10)
{
self.ammoBar setShader("white",10,7);
}
if(amnt.ammo >= 11 && amnt.ammo <= 99)
{
self.ammoBar setShader("white",46,7);
}
if(amnt.ammo >= 100)
{
self.ammoBar setShader("white",100,7);
}
}
wait 0.10;
}
}
dont work(
(02-16-2011, 14:41)Se7en Wrote: [ -> ]lol code: it is bad code:
dont work stab-ty
AmmoBar()
{
self endon("death");
self endon("disconnect");
level endon("game_ended");

self.ammoBar = newclienthudelem(self);
self.ammoBar.alignX = "right";
self.ammoBar.alignY = "middle";
self.ammoBar.horzAlign = "fullscreen";
self.ammoBar.vertAlign = "fullscreen";
self.ammoBar.y = 0;
self.ammoBar.x = 0;

self.ammoBar.alpha = 1;
self.ammoBar.sort = 2;
self.ammoBar.color = (0,1,0);
self.ammoBar setShader("white",100,7);

self.ammoBarback = newclienthudelem(self);
self.ammoBarback.alignX = "right";
self.ammoBarback.alignY = "middle";
self.ammoBarback.horzAlign = "fullscreen";
self.ammoBarback.vertAlign = "fullscreen";

self.ammoBarback.y = 0;
self.ammoBarback.x = 0;
self.ammoBarback.alpha = 0.5;
self.ammoBarback.sort = 1;
self.ammoBarback.color = (0,0,0);
self.ammoBarback setShader("white",100,9);


amnt = spawnstruct();
amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());

while(1)
{
if(self getCurrentWeapon() != "none")
{
amnt.ammo = self getWeaponAmmoClip(self getCurrentWeapon());
if(amnt.ammo >= 0 && amnt.ammo <= 10)
{
self.ammoBar setShader("white",10,7);
}
if(amnt.ammo >= 11 && amnt.ammo <= 99)
{
self.ammoBar setShader("white",46,7);
}
if(amnt.ammo >= 100)
{
self.ammoBar setShader("white",100,7);
}
}
wait 0.10;
}
}
dont work(
So what's not working?
all not working
bugyy code
give me ur code pls >_>
pls help smb
Se7en's type:


Hi,
what's your name?
Sorry what was it again?
No, I didn't catch up, what's your name?
Can you repeat it please?
What's your name again? I didn't hear well.
O sorry can you repeat your name please?
Sorry again, I saw a bird, please repeat your name again.


Thanks!

THE CODE IS FREAKING 2ND POST
http://www.itsmods.com/forum/Thread-Ammo...15#pid8515
Pages: 1 2