Flight Time , Seconds to Minutes
#1

Im resuming my flight script but ran into a problem.
The flighttime is set using

pawn Код:
FlightTime[player] = FLTime_LosSantos;
Or whatever city is chosen. On the top of my script i have:

pawn Код:
#define FLTime_LosSantos  70
#define FLTime_SanFierro  43
#define FLTime_LasVenturas 41

new FlightTime[MAX_PLAYERS];
pawn Код:
if(FlightTime[player] > 9)
        {
          if(FlightTime[player] > 59 & < 120)
              {
                 Minutes++1
               Seconds = Minutes-FlightTime[player];
                     format(string, sizeof(string), "~w~Flight Time: ~g~0%d:%d", Minutes, FlightTime[player]);
              } else {
                     format(string, sizeof(string), "~w~Flight Time: ~g~00:%d", Minutes, FlightTime[player]);
              }
} else {
          format(string, sizeof(string), "~w~Flight Time: ~g~00:0%d", FlightTime[player]);
        }
}
Now what i want is that if the seconds are above 60 like defined in FLTime_LosSantos (70 seconds), it will count + one minute, and then also displays the seconds. So like 01:10 it must display then.

The other code, is if the seconds are above 9 it wont display an extra 0, because if its below 9 (the seconds) it will do like: 00:05.

Can somebody help me with this?
Thanks a million.
Reply


Messages In This Thread
Flight Time , Seconds to Minutes - by Robbin237 - 19.02.2009, 14:59
Re: Flight Time , Seconds to Minutes - by Joe Staff - 19.02.2009, 15:07
Re: Flight Time , Seconds to Minutes - by Robbin237 - 19.02.2009, 15:10
Re: Flight Time , Seconds to Minutes - by yom - 19.02.2009, 16:14
Re: Flight Time , Seconds to Minutes - by Robbin237 - 20.02.2009, 09:14
Re: Flight Time , Seconds to Minutes - by yom - 20.02.2009, 15:23

Forum Jump:


Users browsing this thread: 1 Guest(s)