29.12.2015, 17:01
Hello I have repeating timer for player that updates remaining time -> Hours and Minutes.
It's working, but If I enter lower minute then I get negative minute in string.
For example, if it's 18:30 and I plan maintenance for 19:20 the remaining minute will be negative number, how to fix it? Thanks
pawn Код:
gettime(hour, minute, second);
format(time, sizeof(time), "%02d:%02d", gSettingMaintenanceInfo[MAINTENANCE_HOUR] - hour, gSettingMaintenanceInfo[MAINTENANCE_MINUTE] - minute);
//Setting string to textdraw as next
For example, if it's 18:30 and I plan maintenance for 19:20 the remaining minute will be negative number, how to fix it? Thanks