[Ajuda] public - 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] public (
/showthread.php?tid=455435)
public -
Freak@ - 01.08.2013
Queria ajuda de voces pra saber porque essa public nunca e chamada e como se ela tivesse desativada ja tentei fazer debug mas nao da.
pawn Код:
forward Synctime();
public Synctime()
{
new string[80];
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
Fixhour(tmphour);
tmphour = shifthour;
print("1.");
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
format(string, sizeof(string), "{FF1493}Agora sгo %d:00 horas.",shifthour);
SendClientMessageToAll(COLOR_DBLUE,string);
print("2.");
ghour = tmphour;
PayDay();
SetHora();
}
}
Re: public -
Cidiei - 01.08.2013
Tente fazer um comando que chame esta funзгo
pawn Код:
public Synctime()
{
new string[80],tmphour,tmpminute,tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
Fixhour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23)){
PayDay();
SetHora();
ghour = tmphour;
format(string, sizeof(string), "{FF1493}Agora sгo %d:00 horas.",shifthour);
SendClientMessageToAll(COLOR_DBLUE,string);
}
print("[Debug]: Synctime carregada com sucesso!");
return 1;
}
Re: public -
GReeN_WOoD - 01.08.2013
Tente por isto no OnGameModeInit..
PHP код:
SetTimer("Synctime", 1000, true);