Help with Clock System ! + 1 Rep ! -
Sn4ke2 - 01.06.2015
Hello, I have a problem
My real time is 18:00 and my samp server show with three hours behind
like 18:00 real time and on my samp server show 14:00 ...
Help me guys
PHP код:
stock CalculeazaTimp(secunde)
{
new time = secunde;
new ora = time/3600;
time = time%3600;
new minute = time/60;
time = time%60;
new secunde2 = time;
new string[10];
format(string,sizeof(string),"%02d:%02d:%02d",ora,minute,secunde2);
return string;
}
stock CalculeazaTimp2(secunde)
{
new time = secunde;
time = time%3600;
new minute = time/60;
time = time%60;
new secunde2 = time;
new string[10];
format(string,sizeof(string),"%02d:%02d",minute,secunde2);
return string;
}
AW: Help with Clock System ! + 1 Rep ! -
Kaliber - 01.06.2015
Why you make it so complicated?
Just do this:
Код:
new h,m,s,string[16];
gettime(h,m,s);
format(string,sizeof(string),"%02d:%02d:%02d",h,m,s);
return string;
Re: Help with Clock System ! + 1 Rep ! -
Sn4ke2 - 01.06.2015
i don't now how to make it...
Re: Help with Clock System ! + 1 Rep ! -
Sn4ke2 - 01.06.2015
when i start servr from PC it's worked, but now i have host and dosen't work !...., it's fucked up.
Sorry for my bad english
AW: Help with Clock System ! + 1 Rep ! -
Kaliber - 01.06.2015
Where is the Code for the TextDraw?
What do you write inside it (TextDrawSetString...)
Re: Help with Clock System ! + 1 Rep ! -
Sn4ke2 - 01.06.2015
This is the code TextDraw
PHP код:
Date = TextDrawCreate(542.000061, 8.960021,"--");
TextDrawFont(Date,1);
TextDrawLetterSize(Date,0.367999, 1.525333);
TextDrawColor(Date,-16777279);
TextDrawSetShadow(Date, 1);
TextDrawSetOutline(Date, 1);
Time = TextDrawCreate(553.200073, 22.400056,"--");
TextDrawFont(Time,3);
TextDrawLetterSize(Time,0.507999, 2.486044);
TextDrawColor(Time,-16777279);
TextDrawSetShadow(Time, 1);
TextDrawSetOutline(Time, 1);
AW: Help with Clock System ! + 1 Rep ! -
Kaliber - 01.06.2015
No, where is the TextDrawSetString function for the Time TextDraw?
Re: Help with Clock System ! + 1 Rep ! -
Sn4ke2 - 01.06.2015
PHP код:
public OtherTimer()
{
new string[256];
new stringg[256];
new year,month,day,hours,minutes,seconds;
getdate(year, month, day), gettime(hours, minutes, seconds);
format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
TextDrawSetString(Date, string);
format(string, sizeof string, "%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
TextDrawSetString(Time, string);
AW: Help with Clock System ! + 1 Rep ! -
Kaliber - 01.06.2015
Write it like this:
Код:
new string[256],stringg[256];
new year,month,day,h,m,s;
getdate(year, month, day), gettime(h, m, s);
format(string, sizeof string, "%02d/%02d/%d", day, month, year);
TextDrawSetString(Date, string);
format(string, sizeof string, "%02d:%02d:%02d",h,m,s);
TextDrawSetString(Time, string);
And if it
doesn't (but only then) work, do this:
Код:
format(string, sizeof string, "%02d:%02d:%02d",h+4,m,s);
Re: Help with Clock System ! + 1 Rep ! -
Sn4ke2 - 01.06.2015
I set this
PHP код:
format(string, sizeof string, "%02d:%02d:%02d",h+3,m+5,s);
and now work's , i wait to see if payday works !
THANK YOU !!!! :***** + REP