• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ammo BAR dont work! Buggy
#11
(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.....
  Reply
#12
(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
[Image: wyipjqo9qon7rc2v1lo.jpg]
  Reply
#13
uhhh, of course
  Reply
#14
Easy Text:
http://pastebin.com/RnWfS8WJ
[Image: 1fxsnb.jpg]
  Reply
#15
olol, this is text! me need ammo BAR, sry if i noobing
  Reply
#16
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?
[Image: 1fxsnb.jpg]
  Reply
#17
wtf omg ftw
  Reply
#18
it's work dude
  Reply
#19
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);
  Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)