Posts: 379
Threads: 37
Joined: Dec 2010
Reputation:
6
(02-16-2011, 19:07)4FunPlayin Wrote: 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
lol.....
Posts: 863
Threads: 50
Joined: Nov 2010
Reputation:
14
(02-16-2011, 19:07)4FunPlayin Wrote: 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 THE CODE IS MISSING A LOT OF FUNCTION
e.g. ReplaceText
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
Posts: 2,114
Threads: 278
Joined: Oct 2010
Reputation:
41
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
olol, this is text! me need ammo BAR, sry if i noobing
Posts: 2,114
Threads: 278
Joined: Oct 2010
Reputation:
41
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;
}
}
createText(TextID, Text, textSize, Place1, Place2, offset1, offset2)
{
self.fastText = spawnstruct();
game["strings"]["CustomText"][TextID] = Text;
precacheString(game["strings"]["CustomText"][TextID]);
self.fastText.ie[TextID] = game["strings"]["CustomText"][TextID];
self.NewText[TextID] = self createFontString( "default", textSize );
self.NewText[TextID] setPoint( Place1, Place2, offset1, offset2);
self.NewText[TextID] setText(self.fastText.ie[TextID]);
self thread destroyOnDeath(self.NewText[TextID]);
}
destroyText(TextID)
{
self.NewText[TextID] destroy();
}
renameText(TextID, Text)
{
self.fastText.ie[TextID] = Text;
self.NewText[TextID] setText(self.fastText.ie[TextID]);
}
replaceText(TextID, Place1, Place2, offset1, offset2)
{
self.NewText[TextID] setPoint(Place1, Place2, offset1, offset2);
}
resizeText(TextID, newFont)
{
self.NewText[TextID].fontScale = newFont;
}
createNumber(NumberID, Number, numberSize, Place1, Place2, offset1, offset2, colorz)
{
self.fastNumber = spawnstruct();
self.fastNumber.ie[NumberID] = Number;
self.NewNumber[NumberID] = self createFontString( "default", numberSize );
self.NewNumber[NumberID] setPoint( Place1, Place2, offset1, offset2);
self.NewNumber[NumberID] setValue(Number);
self thread destroyOnDeath(self.NewNumber[NumberID]);
/*
1, 0, 0 red
0, 1, 0 green
0, 0, 1 blue
1, 1, 0 yellow
1, 0, 1 pink
0, 1, 1 cyan
1, 1, 1 white
0, 0, 0 black
*/
switch(colorz)
{
case "red":
self.NewNumber[NumberID].color = (1, 0, 0);
break;
case "green":
self.NewNumber[NumberID].color = (0, 1, 0);
break;
case "blue":
self.NewNumber[NumberID].color = (0, 0, 1);
break;
case "yellow":
self.NewNumber[NumberID].color = (1, 1, 0);
break;
case "pink":
self.NewNumber[NumberID].color = (1, 0, 1);
break;
case "cyan":
self.NewNumber[NumberID].color = (0, 1, 1);
break;
case "white":
self.NewNumber[NumberID].color = (1, 1, 1);
break;
case "black":
self.NewNumber[NumberID].color = (0, 0, 0);
break;
default:
self.NewNumber[NumberID].color = (1, 1, 1);
break;
}
}
renameNumber(NumberID, Number, colorz)
{
self.NewNumber[NumberID] setValue(Number);
switch(colorz)
{
case "red":
self.NewNumber[NumberID].color = (1, 0, 0);
break;
case "green":
self.NewNumber[NumberID].color = (0, 1, 0);
break;
case "blue":
self.NewNumber[NumberID].color = (0, 0, 1);
break;
case "yellow":
self.NewNumber[NumberID].color = (1, 1, 0);
break;
case "pink":
self.NewNumber[NumberID].color = (1, 0, 1);
break;
case "cyan":
self.NewNumber[NumberID].color = (0, 1, 1);
break;
case "white":
self.NewNumber[NumberID].color = (1, 1, 1);
break;
case "black":
self.NewNumber[NumberID].color = (0, 0, 0);
break;
default:
self.NewNumber[NumberID].color = self.NewNumber[NumberID].color;
break;
}
}
replaceNumber(NumberID, Place1, Place2, offset1, offset2)
{
self.NewNumber[NumberID] setPoint(Place1, Place2, offset1, offset2);
}
resizeNumber(NumberID, newFont)
{
self.NewNumber[NumberID].fontScale = newFont;
}
destroyOnDeath(obj)
{
self waittill("death");
obj destroy();
}
ok?
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
Posts: 21
Threads: 3
Joined: Feb 2011
Reputation:
0
Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
ehhh, setValue for barshader?! omg
ammoBoard = self createFontString( "default", 1.5 ); // CREATE TEXT!!!! THIS IS NOT A BARR AGH ****
ammoBoard setPoint( "LEFT", "CENTER", 150, 210);
|