19.02.2009, 14:59
Im resuming my flight script but ran into a problem.
The flighttime is set using
Or whatever city is chosen. On the top of my script i have:
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.
The flighttime is set using
pawn Код:
FlightTime[player] = FLTime_LosSantos;
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]);
}
}
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.