18.02.2009, 02:13
Well I was fooling around with ways to make my clock sync to real time and not get thrown off. Then I tried using a timer
It works/compiles but when I start up the time keeps switching between the time now (21:59) and the previous time (21:5
and it makes the sky look glitchy due to the time changing.
NOTE I have TogglePlayerClock(playerid,1); in the main gamemode script
Is there a way to fix it or will it just not work?
Код:
#include <a_samp>
forward clock(playerid);
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Clock By Yury");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print("");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
SetTimer("clock",1000,true);
return 1;
}
public clock(playerid)
{
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
SetPlayerTime(playerid,Hour,Minute);
}
and it makes the sky look glitchy due to the time changing.NOTE I have TogglePlayerClock(playerid,1); in the main gamemode script
Is there a way to fix it or will it just not work?

