error with 24 format with hours
#3

Quote:
Originally Posted by 1fret
Посмотреть сообщение
You cant just show a picture and expect us to give you a fix for your situation, you have to show us some coding.
I really didn't know were to look...
All i know i have this public and there are 3 textdraws
Код:
forward TimeUpdate();
public TimeUpdate()
{
    new Hour, Min, Sec, Day, Month, Year;
    new TimeString[256], TimeString2[256], TimeString3[256];
    gettime(Hour, Min, Sec);
    getdate(Year, Month, Day);
   	new year, month,day;
	getdate(year, month, day);
	new mtext[40];
	if(month == 1) { mtext = "ianuarie"; }
	else if(month == 2) { mtext = "februarie"; }
	else if(month == 3) { mtext = "martie"; }
	else if(month == 4) { mtext = "aprilie"; }
	else if(month == 5) { mtext = "mai"; }
	else if(month == 6) { mtext = "iunie"; }
	else if(month == 7) { mtext = "iulie"; }
	else if(month == 8) { mtext = "august"; }
	else if(month == 9) { mtext = "septembrie"; }
	else if(month == 10) { mtext = "octombrie"; }
	else if(month == 11) { mtext = "noiembrie"; }
	else if(month == 12) { mtext = "decembrie"; }
	if(Hour <= 9)
	{
		format(TimeString,25,"0%d:%d",Hour, Min);
  	}
	else
	{
		format(TimeString,25,"%d:%d",Hour, Min);
  	}
   	if(Min <= 9)
   	{
    	format(TimeString,25,"%d:0%d",Hour, Min);
     }
	else
	{
 		format(TimeString,25,"%d:%d",Hour, Min);
   	}
    if(Sec <= 9)
    {
    	format(TimeString2,25,":0%d", Sec);
    }
	else
	{
 		format(TimeString2,25,":%d", Sec);
	}
    if(Day <= 9)
    {
    	format(TimeString3,25,"0%d %s", Day, mtext);
    }
	else
	{
 		format(TimeString3,25,"%d %s", Day, mtext);
   	}
   	TextDrawSetString(HClock,TimeString);
    TextDrawShowForAll(HClock);
    TextDrawSetString(HClock2,TimeString2);
    TextDrawShowForAll(HClock2);
    TextDrawSetString(HClock3,TimeString3);
    TextDrawShowForAll(HClock3);
    return 1;
}
Reply


Messages In This Thread
error with 24 format with hours - by MrTea - 17.04.2017, 19:23
Re: error with 24 format with hours - by 1fret - 17.04.2017, 19:50
Re: error with 24 format with hours - by MrTea - 17.04.2017, 20:10
Re: error with 24 format with hours - by khRamin78 - 18.04.2017, 04:12
Re: error with 24 format with hours - by MrTea - 18.04.2017, 09:18
Re: error with 24 format with hours - by GangstaSunny. - 18.04.2017, 09:53
Re: error with 24 format with hours - by MrTea - 18.04.2017, 10:36
Re: error with 24 format with hours - by GangstaSunny. - 18.04.2017, 11:21
Re: error with 24 format with hours - by MrTea - 18.04.2017, 13:30
Re: error with 24 format with hours - by MrTea - 18.04.2017, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)