SA-MP Forums Archive
[Ajuda] Problema com relуgio a hora fica certa no pc e atrasada no host. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Problema com relуgio a hora fica certa no pc e atrasada no host. (/showthread.php?tid=438772)



Problema com relуgio a hora fica certa no pc e atrasada no host. - Breno Da Silva Pereira - 21.05.2013

A hora fica certa quando eu ligo o seve no pc mais quando eu ligo no host a hora fica atrasada.
Code:
#include <a_samp>

forward reloginho(playerid);
new Text:Reloginho1;
new Text:Reloginho2;

public OnFilterScriptInit()
{
    
 	
	SetTimer("reloginho",1000,1);
	
	Reloginho1 = TextDrawCreate(525.000000,5.000000,"--");
	Reloginho2 = TextDrawCreate(550.000000,23.000000,"--");
	TextDrawAlignment(Reloginho1,0);
	TextDrawAlignment(Reloginho2,0);
	TextDrawBackgroundColor(Reloginho1,0x000000FF);
	TextDrawBackgroundColor(Reloginho2,0x000000FF);
	TextDrawFont(Reloginho1,2);
	TextDrawLetterSize(Reloginho1,0.399999,2.000000);
	TextDrawFont(Reloginho2,2);
	TextDrawLetterSize(Reloginho2,0.399999,2.000000);
	TextDrawColor(Reloginho1,0xFFFFFFFF);
	TextDrawColor(Reloginho2,0xFFFFFFFF);
	TextDrawSetProportional(Reloginho1,1);
	TextDrawSetProportional(Reloginho2,1);
	TextDrawSetShadow(Reloginho1,1);
	TextDrawSetShadow(Reloginho2,1);
	
	TextDrawSetOutline(Reloginho1,1);
	TextDrawSetOutline(Reloginho2,1);
	TextDrawShowForAll(Reloginho1);
	TextDrawShowForAll(Reloginho2);
	return 1;
}

public OnFilterScriptExit()
{
    TextDrawDestroy(Reloginho1);
    TextDrawDestroy(Reloginho2);
   	TextDrawHideForAll(Reloginho1);
   	TextDrawHideForAll(Reloginho2);
   	
   	
	return 1;
}

public OnPlayerSpawn(playerid)
{
    TextDrawHideForAll(Reloginho1);
    TextDrawShowForPlayer(playerid, Reloginho1);
    TextDrawHideForAll(Reloginho2);
	TextDrawShowForPlayer(playerid, Reloginho2);
	return 1;
}

public reloginho(playerid)
{
	new
		string[256],
		ano,
		mes,
		dia,
		horas,
		minutos,
		segundos;
	getdate(ano, mes, dia);
	gettime(horas, minutos, segundos);
	format(string, sizeof string, "%d/%s%d/2013", dia, ((mes < 10) ? ("0") : ("")), mes);
	TextDrawSetString(Reloginho1, string);
	format(string, sizeof string, "%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos, (segundos < 10) ? ("0") : (""), segundos);
	TextDrawSetString(Reloginho2, string);
}



Re: Problema com relуgio a hora fica certa no pc e atrasada no host. - ProKillerpa - 21.05.2013

Quantas horas fica adiantada no host?


Re: Problema com relуgio a hora fica certa no pc e atrasada no host. - Breno Da Silva Pereira - 21.05.2013

Quote:
Originally Posted by ProKillerpa
View Post
Quantas horas fica adiantada no host?
ele fica 7 minutos atrasado


Re: Problema com relуgio a hora fica certa no pc e atrasada no host. - davi54723 - 21.05.2013

Adianta 7 minutos '-'


Re: Problema com relуgio a hora fica certa no pc e atrasada no host. - Breno Da Silva Pereira - 21.05.2013

Quote:
Originally Posted by davi54723
View Post
Adianta 7 minutos '-'
ja tentei faser isso mais nao deu certo nao


Re: Problema com relуgio a hora fica certa no pc e atrasada no host. - mau.tito - 21.05.2013

ja tento fazer isto !
pawn Code:
public reloginho(playerid)
{
    new
        string[256],
        ano,
        mes,
        dia,
        horas,
        minutos,
        segundos;
    getdate(ano, mes, dia);
    gettime(horas, minutos, segundos);
    format(string, sizeof string, "%d/%s%d/2013", dia, ((mes < 10) ? ("0") : ("")), mes);
    TextDrawSetString(Reloginho1, string);
    format(string, sizeof string, "%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos+7, (segundos < 10) ? ("0") : (""), segundos);
    TextDrawSetString(Reloginho2, string);
}



Re: Problema com relуgio a hora fica certa no pc e atrasada no host. - Breno Da Silva Pereira - 22.05.2013

Quote:
Originally Posted by mau.tito
View Post
ja tento fazer isto !
pawn Code:
public reloginho(playerid)
{
    new
        string[256],
        ano,
        mes,
        dia,
        horas,
        minutos,
        segundos;
    getdate(ano, mes, dia);
    gettime(horas, minutos, segundos);
    format(string, sizeof string, "%d/%s%d/2013", dia, ((mes < 10) ? ("0") : ("")), mes);
    TextDrawSetString(Reloginho1, string);
    format(string, sizeof string, "%s%d:%s%d:%s%d", (horas < 10) ? ("0") : (""), horas, (minutos < 10) ? ("0") : (""), minutos+7, (segundos < 10) ? ("0") : (""), segundos);
    TextDrawSetString(Reloginho2, string);
}
Muito Obrigado Mesmo, Tentei dar mais reputaзгo pra vocк mais o seu numero nem subio nem nada quando atualizei a pagina Ainda nгo posso dar rep pra ninguem que droga.