Quote:
Originally Posted by Nero_3D
Do you update the time in a timer or is that code you posted just called once in OnPlayerConnect ?
If you call it only once it should run like in single player
Otherwise its your code like I told your before because tickcount is in milliseconds
Also why 1440000 ?
|
Let me explain my code
Code:
TogglePlayerClock(playerid,ENABLE);
:P Its understood :P
Code:
new count = tickcount();
I will get the tick in ms(tick which was counted since server start up)
Code:
count = count%1440000;
Since I get it in ms I need to convert it into seconds for the game where I must remove complete days.
One complete day in San Andreas In-game will take 24 minutes that in ms is =
24 * 60 * 1000 = 1440000ms.
So now my count has the current second that being shown in everyone's clock.
Code:
SetPlayerTime(playerid,count/60,count%60);
When I divide the count by 60 I would get the hour because every SA hour is a real world minute(so divide by 60).
The remainder left after dividing will give me the SA minutes....
All are my assumptions......hope the SAMP clock works this way.... and my code wasn't crap... :P
And what is that timer thingy??I tought the time gets updated by itself.Only I had to set it with the correct time.