Posts: 150
Threads: 38
Joined: Feb 2014
eu coloquei um relogio com data e hora certa,mais o relogio fica com a hora errada,mais ou minutos estao certos,a data ta normal ,como conserto esse erro?
Posts: 5,314
Threads: 12
Joined: Aug 2010
Reputation:
0
Sem cуdigo nгo dб pra saber
Posts: 150
Threads: 38
Joined: Feb 2014
Quote:
#include <a_samp>
new Text:Relogio;
new Textata;
public OnGameModeInit()
{
print("-----------------------------");
print("Sistema de Relogio Carregado");
print("Desenvolvido por: Kanuy");
print("-----------------------------");
SetTimer("Hora", 1000, true);
Relogio = TextDrawCreate(470.000000,4.000000,"");
Data = TextDrawCreate(550.000000,23.000000,"");
TextDrawAlignment(Relogio,0);
TextDrawAlignment(Data,0);
TextDrawBackgroundColor(Relogio,0x000000AA);
TextDrawBackgroundColor(Data,0x000000AA);
TextDrawFont(Relogio,3);
TextDrawLetterSize(Relogio,0.500000,2.000000);
TextDrawFont(Data,3);
TextDrawLetterSize(Data,0.399999,2.000000);
TextDrawColor(Relogio,0xffffffff);
TextDrawColor(Data,0xffffffff);
TextDrawSetProportional(Relogio,1);
TextDrawSetProportional(Data,1);
TextDrawSetShadow(Relogio,1);
TextDrawSetShadow(Data,1);
TextDrawSetOutline(Relogio,1);
TextDrawSetOutline(Data,1);
TextDrawShowForAll(Relogio);
TextDrawShowForAll(Data);
return 1;
}
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid, true);
TextDrawHideForAll(Relogio);
TextDrawShowForPlayer(playerid, Relogio);
TextDrawHideForAll(Data);
TextDrawShowForPlayer(playerid, Data);
return 1;
}
forward Hora();public Hora()
{
static _ist[20], d, m, a; getdate(a, m, d);
format(_ist, sizeof _ist, " %i/%02d/2014", d, m);
TextDrawSetString(Relogio, _ist);
gettime(a, m, d);
format(_ist, sizeof _ist, "%02d:%02d:%02d",a,m,d);
TextDrawSetString(Data, _ist);
TextDrawShowForAll(Data);
TextDrawShowForAll(Relogio);
}
|
ta ai
Posts: 841
Threads: 105
Joined: Nov 2011
Reputation:
0
Tu precisa й concertar o teu portuguкs. " consertar "
Posts: 150
Threads: 38
Joined: Feb 2014
o portuguкs й meu e eu uso como eu bem quiser,e nгo estamos aqui para descutir sobre o portuguкs de ninguйm,e sim para ver se alguйm me ajuda com esse erro.
Coloca o codigo em [*pawn][*/pawn]
Posts: 150
Threads: 38
Joined: Feb 2014
[*/pawn]#include <a_samp>
new Text:Relogio;
new Textata;
public OnGameModeInit()
{
print("-----------------------------");
print("Sistema de Relogio Carregado");
print("Desenvolvido por: Kanuy");
print("-----------------------------");
SetTimer("Hora", 1000, true);
Relogio = TextDrawCreate(470.000000,4.000000,"");
Data = TextDrawCreate(550.000000,23.000000,"");
TextDrawAlignment(Relogio,0);
TextDrawAlignment(Data,0);
TextDrawBackgroundColor(Relogio,0x000000AA);
TextDrawBackgroundColor(Data,0x000000AA);
TextDrawFont(Relogio,3);
TextDrawLetterSize(Relogio,0.500000,2.000000);
TextDrawFont(Data,3);
TextDrawLetterSize(Data,0.399999,2.000000);
TextDrawColor(Relogio,0xffffffff);
TextDrawColor(Data,0xffffffff);
TextDrawSetProportional(Relogio,1);
TextDrawSetProportional(Data,1);
TextDrawSetShadow(Relogio,1);
TextDrawSetShadow(Data,1);
TextDrawSetOutline(Relogio,1);
TextDrawSetOutline(Data,1);
TextDrawShowForAll(Relogio);
TextDrawShowForAll(Data);
return 1;
}
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid, true);
TextDrawHideForAll(Relogio);
TextDrawShowForPlayer(playerid, Relogio);
TextDrawHideForAll(Data);
TextDrawShowForPlayer(playerid, Data);
return 1;
}
forward Hora();public Hora()
{
static _ist[20], d, m, a; getdate(a, m, d);
format(_ist, sizeof _ist, " %i/%02d/2014", d, m);
TextDrawSetString(Relogio, _ist);
gettime(a, m, d);
format(_ist, sizeof _ist, "%02d:%02d:%02d",a,m,d);
TextDrawSetString(Data, _ist);
TextDrawShowForAll(Data);
TextDrawShowForAll(Relogio);
}[*/pawn]
ta ai
Posts: 143
Threads: 9
Joined: Apr 2014
Reputation:
0
Olha amigo,a hora estб errada pelo motivo da VPS/DEDICADO onde estб hospedado seu servidor,estar com a hora errada,entre em contato com o suporte e peзa para alterarem a hora.