!!Time Machine!!
#9

Quote:
Originally Posted by Nero_3D
View Post
Yeah you are right, the time really moves by itself in seconds, it's been a long long time since I last played

The only problem I noticed is that you didn't removed the milliseconds from the tickcount
pawn Code:
new count = tickcount(); // lets say this is 5321 - 5 seconds 321 milliseconds
count = count%1440000; // thats far less than that so it stays
SetPlayerTime(playerid,count/60,count%60); // result = 88 and 41
//
new count = (tickcount() / 1000) % 1440; // 5321 / 1000 => 5, or just (gettime() % 1440)
SetPlayerTime(playerid,count/60,count%60); // 0 and 5
But I don't know why your clocks moves so fast
Since this isn't natural it is caused by a script (gamemode, filterscript, include ?)

Also this code needs to be in OnPlayerSpawn because if you die the time moves 8 hours in the future

Edit: Just noticed another thing, if you pause the game the clock stops, I think its better if you update it manually in a timer each second
I will use a timer and thanks for the that fix.I dint notice it.
Thank you both

I will go through all my code and will try to find out what is triggering the super fast clock.
Reply


Messages In This Thread
!!Time Machine!! - by Yashas - 27.12.2013, 16:08
Re: !!Time Machine!! - by Yashas - 28.12.2013, 13:39
AW: !!Time Machine!! - by Nero_3D - 28.12.2013, 15:04
Re: AW: !!Time Machine!! - by Yashas - 30.12.2013, 14:26
AW: !!Time Machine!! - by Nero_3D - 30.12.2013, 14:58
Re: AW: !!Time Machine!! - by Yashas - 31.12.2013, 10:46
AW: !!Time Machine!! - by Nero_3D - 31.12.2013, 11:37
Re: !!Time Machine!! - by park4bmx - 31.12.2013, 11:51
Re: AW: !!Time Machine!! - by Yashas - 01.01.2014, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)