tiemr problems plz help

03/12/2012 21:40 fear-x#1
Code:
If TimerDiff($_TimerLog) < 1000 Then
		If $Seconds > "59" Then
			$Seconds = "00"
			GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
			$Minutes += 1

			If $Minutes > "59" Then
				$Minutes = "00"
				GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
				$Hours += 1
			EndIf
			If $Hours > "59" Then
				$Hours = "00"
				GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
				$Days += 1
			EndIf
		Else
			$Seconds = $Seconds + 1
		EndIf
		GUICtrlSetData($timer, $Days&":"&$Hours&":"&$Minutes&":"&$Seconds)
	Else
		MsgBox(0, "", "bad")
	EndIf
	$_TimerLog = TimerInit()

anybody know how to make this set the timer every 1sec not every milisec?
i dont wana use sleep ... ;/
03/12/2012 21:59 jacky919#2
Sorry for not answering your question, but I would use an other Way to calcute the time.
PHP Code:
$hour Int($time/3600000)
$min Int(Mod($time3600000)/60000)
$sec Int(Mod(Mod($time3600000), 60000)/1000
Not tested...
03/12/2012 22:06 fear-x#3
na the time calculation is fine like now.. but the problem is that i dunno how to make it change only every 1sec... apart from using adlib
03/12/2012 22:13 jacky919#4
PHP Code:
$time 0
$timer 
TimerInit()

While 
1

If TimerDiff($timer)-$time >= 1000 Then
$time 
TimerDiff($timer)
;Do 
Something
EndIf

WEnd 
03/12/2012 22:14 bollen#5
You have to change only this line
Code:
[COLOR=#660066]If[/COLOR] [COLOR=#660066]TimerDiff[/COLOR][COLOR=#666600]([/COLOR]$_TimerLog[COLOR=#666600])[/COLOR] [COLOR=#666600]<[/COLOR] [COLOR=#006666]1000[/COLOR] [COLOR=#660066]Then[/COLOR]
at the moment <1000. This is true at 0-1000 milliseconds
it have to be =1000. This is only true at 1000 milliseconds
=1000 may not work because you dont hit the 1000 exact
use this to get it work
Code:
 TimerDiff($_TimerLog) >= 1000 Then
03/13/2012 18:01 fear-x#6
Quote:
Originally Posted by bollen View Post
You have to change only this line
Code:
[COLOR=#660066]If[/COLOR] [COLOR=#660066]TimerDiff[/COLOR][COLOR=#666600]([/COLOR]$_TimerLog[COLOR=#666600])[/COLOR] [COLOR=#666600]<[/COLOR] [COLOR=#006666]1000[/COLOR] [COLOR=#660066]Then[/COLOR]
at the moment <1000. This is true at 0-1000 milliseconds
it have to be =1000. This is only true at 1000 milliseconds
=1000 may not work because you dont hit the 1000 exact
use this to get it work
Code:
 TimerDiff($_TimerLog) >= 1000 Then
thnx epic :)
now ive another problem .. how to prevent the timer from getting frozen by cheat engine or anything else :DD
03/13/2012 18:50 jacky919#7
Quote:
Originally Posted by fear-x View Post
thnx epic :)
now ive another problem .. how to prevent the timer from getting frozen by cheat engine or anything else :DD
You could try the [Only registered and activated users can see links. Click Here To Register...] function. I think this function isn't affected by Cheat Engine.
03/13/2012 19:11 fear-x#8
didnt help :/ i need timer not clock :/

any way of preventing timer being edited would b e good.i was thinking of using registries but then again they can find out where and which bcz ppl would look everywhere posible :/
03/13/2012 21:58 SaGaRaS#9
Code:
[COLOR="Blue"]$Minutes = 90 [COLOR="Lime"]; will wait 90 minutes[/COLOR]

Local $60Count = 0, $begin = TimerInit()
While $Minutes > $60Count
   
    $dif = TimerDiff($begin)
    $dif2 = StringLeft($dif, StringInStr($dif, ".") -1)
    $Count = int($dif/1000)
    $60Count = Int($Count / 60)
   
    ToolTip("Minutes Required = " & $Minutes & @CRLF & "Minutes Past = " & $60Count & @CRLF & "Seconds Count = " & $Count & @CRLF & "Mili-Seconds Count = " & $dif2, 20, 20, "Time Machine #1", 1)
   
    Sleep(20)
   
WEnd[/COLOR]
Working For me men :D
03/13/2012 22:03 fear-x#10
thnx guys for help :D
but i decided to make timer server side :D
using some clock scripts on server and reading time from client side :D will definetly prevent hacking timer :D
03/14/2012 18:22 jacky919#11
Quote:
Originally Posted by fear-x View Post
will definetly prevent hacking timer :D
Packethacking...