• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ammo BAR dont work! Buggy
#1
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;
        }

  Reply
#2
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.
[Image: 1fxsnb.jpg]
  Reply
#3
noo, this is not aammo bar!
  Reply
#4
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-
[Image: 1fxsnb.jpg]
  Reply
#5
o_o give me code pls) of ammo bar
  Reply
#6
(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
[Image: wyipjqo9qon7rc2v1lo.jpg]
  Reply
#7
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(
  Reply
#8
(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?
[Image: wyipjqo9qon7rc2v1lo.jpg]
  Reply
#9
all not working
bugyy code
give me ur code pls >_>
pls help smb
  Reply
#10
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
[Image: 1fxsnb.jpg]
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Help Permissions DOESNT work Hallla 2 971 08-18-2013, 11:28
Last Post: hillbilly
  [Request] no ammo for infected gamemode ExoGamer* 8 1,852 08-15-2013, 18:59
Last Post: Dr3am95
  Help improper syntax but i dont know where Brandeeno 6 1,587 07-28-2013, 19:25
Last Post: Brandeeno
  why permissions dont work. ? ExoGamer* 4 1,111 07-21-2013, 13:46
Last Post: X-Track
  M320 and GP25 ammo McKinleySPB 3 1,050 07-06-2013, 12:56
Last Post: archit
Smile [Release] Unlimited ammo v2.3 & @Nukems unlammo hillbilly 40 9,550 06-26-2013, 11:33
Last Post: X-Track
  Bunker Plugin Won't work OBJAY 4 1,685 06-03-2013, 15:48
Last Post: X-Track
Question can't find it (ammo box) DJSKilly 8 1,466 05-29-2013, 11:27
Last Post: Dr3am95
  Help prefix doesnt work with shop koro35 2 1,024 05-18-2013, 10:51
Last Post: koro35
  Help Perks do not work (( x1412 6 1,371 04-06-2013, 18:09
Last Post: x1412

Forum Jump:


Users browsing this thread: 1 Guest(s)