Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
02-15-2011, 18:12
(This post was last modified: 08-28-2011, 14:22 by Nekochan.)
How? here code:
buggy
PHP Code: AmmoBar() {
useBar = createPrimaryProgressBar( -250 ); useBar.y = 220; useBar.x = 65; useBar.bar.y = 220; useBar.bar.x = 0; useBarText = createPrimaryProgressBarText( -250 ); useBarText.y = 205; for(;;) { self.Clip = self getWeaponAmmoClip(self getCurrentWeapon()); self.Stock = self getWeaponAmmoStock(self getCurrentWeapon()); usebar updateBar( self.clip/100,100 ); wait 0.05; } }
Posts: 2,114
Threads: 278
Joined: Oct 2010
Reputation:
41
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.
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
noo, this is not aammo bar!
Posts: 2,114
Threads: 278
Joined: Oct 2010
Reputation:
41
02-16-2011, 13:46
(This post was last modified: 02-16-2011, 13:48 by 4FunPlayin.)
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-
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
02-16-2011, 14:23
(This post was last modified: 02-16-2011, 14:23 by Nekochan.)
o_o give me code pls) of ammo bar
Posts: 863
Threads: 50
Joined: Nov 2010
Reputation:
14
(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
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
02-16-2011, 14:41
(This post was last modified: 02-16-2011, 14:43 by Nekochan.)
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(
Posts: 863
Threads: 50
Joined: Nov 2010
Reputation:
14
(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?
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
02-16-2011, 15:01
(This post was last modified: 02-16-2011, 15:58 by Nekochan.)
all not working
bugyy code
give me ur code pls >_>
pls help smb
Posts: 2,114
Threads: 278
Joined: Oct 2010
Reputation:
41
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
|