View Single Post
  #4  
Old 01-07-2010, 07:49 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
i updated the script, it doesn't do anything with @= tho, no response in the texteditctrl.
also added the clear and "." button.
PHP Code:
//#CLIENTSIDE
function onWeaponFired()
{
  new 
GuiWindowCtrl("Calculator_window")
  {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "165, 200";
    
canmove true;
    
canresize false;
    
closequery false;
    
destroyonhide true;
    
text "Calculator";
    
300;
    
200;
    
    new 
GuiTextEditCtrl("Calculator_input")
    {
      
profile GuiBlueTextEditProfile;
      
5;
      
5;
      
width 155;
      
height 30;
      
text="0";
    }
    new 
GuiButtonCtrl("Calculator_clear")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "Clear";
      
width 35;
      
5;
      
45;
    }
    new 
GuiButtonCtrl("Calculator_plusmin")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "+/-";
      
width 35;
      
45;
      
45;
    }
    new 
GuiButtonCtrl("Calculator_divide")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "%";
      
width 35;
      
85;
      
45;
    }
    new 
GuiButtonCtrl("Calculator_multiply")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "X";
      
width 35;
      
125;
      
45;
    }
        new 
GuiButtonCtrl("Calculator_seven")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "7";
      
width 35;
      
5;
      
75;
    }
    new 
GuiButtonCtrl("Calculator_eight")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "8";
      
width 35;
      
45;
      
75;
    }
    new 
GuiButtonCtrl("Calculator_nine")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "9";
      
width 35;
      
85;
      
75;
    }
    new 
GuiButtonCtrl("Calculator_subtract")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "-";
      
width 35;
      
125;
      
75;
    }
        new 
GuiButtonCtrl("Calculator_four")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "4";
      
width 35;
      
5;
      
105;
    }
    new 
GuiButtonCtrl("Calculator_five")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "5";
      
width 35;
      
45;
      
105;
    }
    new 
GuiButtonCtrl("Calculator_six")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "6";
      
width 35;
      
85;
      
105;
    }
    new 
GuiButtonCtrl("Calculator_add")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "+";
      
width 35;
      
125;
      
105;
    }
        new 
GuiButtonCtrl("Calculator_one")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "1";
      
width 35;
      
5;
      
135;
    }
    new 
GuiButtonCtrl("Calculator_two")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "2";
      
width 35;
      
45;
      
135;
    }
    new 
GuiButtonCtrl("Calculator_three")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "3";
      
width 35;
      
85;
      
135;
    }
    new 
GuiButtonCtrl("Calculator_equals")
    {
      
profile GuiBlueButtonProfile;
      
height 55;
      
text "=";
      
width 35;
      
125;
      
135;
    }
    new 
GuiButtonCtrl("Calculator_zero")
    {
      
profile GuiBlueButtonProfile;
      
height 25;
      
text "0";
      
width 75;
      
5;
      
165;
    }
    new 
GuiButtonCtrl("Calculator_dot")
    {
    
profile GuiBlueButtonProfile;
      
height 25;
      
text ",";
      
width 35;
      
85;
      
165;
    }
    
  }
}
function 
Calculator_one.onAction()
{
  if(
input.text 0)
  {
    
input.text 1;
  }
  else
  {
    
input.text @= 1;
  }
}
function 
Calculator_two.onAction()
{
  if(
input.text 0)
  {
    
input.text 2;
  }
  else
  {
    
input.text @= 2;
  }
}
function 
Calculator_three.onAction()
{
  if(
input.text 0)
  {
    
input.text 3;
  }
  else
  {
    
input.text @= 3;
  }
}
function 
Calculator_four.onAction()
{
  if(
input.text 0)
  {
    
input.text 4;
  }
  else
  {
    
input.text @= 4;
  }
}
function 
Calculator_five.onAction()
{
  if(
input.text 0)
  {
    
input.text 5;
  }
  else
  {
    
input.text @= 5;
  }
}
function 
Calculator_six.onAction()
{
  if(
input.text 0)
  {
    
input.text 6;
  }
  else
  {
    
input.text @= 6;
  }
}
function 
Calculator_seven.onAction()
{
  if(
input.text 0)
  {
    
input.text 7;
  }
  else
  {
    
input.text @= 7;
  }
}
function 
Calculator_eight.onAction()
{
  if(
input.text 0)
  {
    
input.text 8;
  }
  else
  {
    
input.text @= 8;
  }
}
function 
Calculator_nine.onAction()
{
  if(
input.text 0)
  {
    
input.text 9;
  }
  else
  {
    
input.text @= 9;
  }
}
function 
Calculator_clear.onAction()
{
  
input.text 0;
}
function 
Calculator_dot.onAction()
{
  
input.text @= ".";

__________________
Quote:
Originally Posted by Tigairius View Post
I promise when I get rich I'll send you an iPhone. I'll send everyone an iPhone.
Reply With Quote