Fuel Script error

![alt text][1]

Hi below is a working script.This script works in displaying a timer
displaying 00:00:00>to 00:00:01 in Hour,Min,Second.

now is runs for every 1mins my GUI.Label( Rect( 5, 25, 100, 100 ), FuelGauge[displayMinutes * 1] ); my FuelGauge[will +1],

So nows the point.i only have FuelGauge0-10,so after 10mins my fuelGauge texture gone.how am i suppose to make it stay at -------- FuelGauge[10] and show a text “no Fuel” can any1 help Thx very Much …

When you looking at the image below,i wanted when the fuel reach 0 it will hold there,but not disspear . or any1 have better idea for making fuel run just like a car,means when start fuel drop and car stop fuel pause and when no fuel i want it explode

private var startTime;

private var restSeconds : int;

private var roundedRestSeconds : int;

private var displaySeconds : int;

private var displayMinutes : int;

private var displayHours : int;

var countDownSeconds : int;

var FuelGauge : Texture;

function Awake() {

startTime = Time.time;

}

function OnGUI () {

//make sure that your time is based on when this script was first called

//instead of when your game started

var guiTime = Time.time + startTime;

restSeconds = countDownSeconds + (guiTime);



GUI.Label( Rect( 5, 25, 100, 100 ), FuelGauge[displaySeconds * 1] );

//display the timer

roundedRestSeconds = Mathf.CeilToInt(restSeconds);

displaySeconds = roundedRestSeconds % 60;

displayMinutes = roundedRestSeconds / 60;

displayHours   = roundedRestSeconds / 60;

text = String.Format ("{0:00}:{0:00}:{1:00}", displayMinutes, displaySeconds); 

GUI.Label (Rect (400, 25, 100, 30), text);

}

function Update(){

if ( displaySeconds > 10 ) {

	  GUI.Label( Rect( 5, 25, 100, 100 ), FuelGauge[10]);

	  GUI.Text(Rect(5, 50,100,100),"No Fuel");

}

else if ( displaySeconds < 0 ) {

	displaySeconds = 0;

}

}

[1]:

Please note All GUI can only put into OnGUI() fuction otherwise it does work,put all below your code to OnGUI function, and you can add condition for toggle to display what you want

if ( displaySeconds > 10 ) {

  GUI.Label( Rect( 5, 25, 100, 100 ), FuelGauge[10]);

}

else if ( displaySeconds < 0 ) {

displaySeconds = 0;
GUI.Text(Rect(5, 50,100,100),"No Fuel");

}

Thx to merry christmas

var FuelGauge : Texture;

var myTextureHeight : float;

var myTextureWidth : float;

var timer : float = 0;

function OnGUI(){

  if(timer < 20)
  {

  Debug.Log("Full fuel");
  }

  if(timer < 40 && timer > 20)
  {


  Debug.Log("20 sec passed - fuel is lower");
  }

  if(timer < 60 && timer > 40)
  {

  Debug.Log("40 sec passed - fuel is lower");
  }

}

function Update () {

  timer += Time.deltaTime;

}

somethings silimar for it to work, just use different timer. if some 1 know how to edit the top script, you are free to do so. Thx