Skripta koju koristim: Moja
Detaljan opis problema: Napravio sam vreme na server da mi pokazuje ono TD i sada kada sam napravio radilo mi lepo ali sada mi kasni 2h, ako je kod nas 13h na server pise 15h-16h.
Dio skripte: SetTimer("postavivremepk",1000, true);
public postavivremepk(playerid) //Vreme
{
new string[256],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(datumpk, string);
format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
TextDrawSetString(vremepk, string);
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
To moraš u hostingu njima reći da promjenu vrijeme na host mašini,
ili možeš ovako:
[pawn]SetTimer("postavivremepk",1000, true);
public postavivremepk(playerid) //Vreme
{
new string[256],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(datumpk, string);
format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours+2, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
TextDrawSetString(vremepk, string);
}[/pawn]
@Arkoo (hours < 10) ? ("0") : (""), hours+2
vidis da ima if provjera lakse mu je ovako
SetTimer("postavivremepk",1000, true);
public postavivremepk(playerid) //Vreme
{
new string[256],year,month,day,hours,minutes,seconds;
getdate(year, month, day), gettime(hours, minutes, seconds); hours += 2;
format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
TextDrawSetString(datumpk, string);
format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
TextDrawSetString(vremepk, string);
}
Najbolje je da ti host sredi to jer je to do njih, ovo sto su ti slali da dodajes +2h moze i tako ali onda moras svuda tako dodavati gde god koristis nesto za vreme da bi bilo sve dobro zato je najbolje da host sredi...
Aa gettimee?
gettimee(%0,%1,%2) gettime(%0,%1,%2); %0 += 2
I sada samo CTRL+H
gettime
gettimee
:)
Ok pitao sam hosting