#1

Код:
public settime(playerid)
{
        new string[256],year,month,day,hours,minutes;
        getdate(year, month, day), gettime(hours, minutes);
        format(string, sizeof string, "%s%d.%s%d.%d", (year < 10) ? ("0") : (""), year, ((month < 10) ? ("0") : ("")), month, day);
        TextDrawSetString(DateB, string);
        format(string, sizeof string, "%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes);
        TextDrawSetString(TimeB, string);
}
this is my time... how can i make if is example moring to be moring and if is 20:00h to be night
Reply
#2

You mean if the time is 8:00, the in-game time to be 8:00 (morning time)?
Reply
#3

yes..
Reply
#4

Код:
public settime(playerid)
{
        new string[256],year,month,day,hours,minutes;
        getdate(year, month, day), gettime(hours, minutes);
        format(string, sizeof string, "%s%d.%s%d.%d", (year < 10) ? ("0") : (""), year, ((month < 10) ? ("0") : ("")), month, day);
        TextDrawSetString(DatumB, string);
        format(string, sizeof string, "%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes);
        TextDrawSetString(TimeB, string);
        SetWorldTime(hours);
}
Just add SetWorldTime(hours);
Reply
#5

wtf, why these conditions

PHP код:
public settime(playerid){
    new 
string[256],year,month,day,hours,minutes;
    
getdate(yearmonthday), gettime(hoursminutes);
    
format(stringsizeof string"%02d.%02d.%02d"yearmonthday);
    
TextDrawSetString(DatumBstring);
    
format(stringsizeof string"%02d:%02d",  hours,  minutes);
    
TextDrawSetString(VrijemeBstring);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)