| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		kokkinogenis Advanced Cheater
  Reputation: 0
  Joined: 10 Sep 2015 Posts: 82 Location: Greece
  | 
		
			
				 Posted: Thu Nov 26, 2015 9:50 am    Post subject: how to search time | 
				       | 
			 
			
				
  | 
			 
			
				Hello ! I have an offline game in my PC. A racing game. Now, i want to change the clock, that tells how much time you did, to go to the finish line. but the time is strange writen. Its like that for example: 0:14:39
 
 
 
0                           :  14                         :  39 
 
 
stands for minutes   |   stands for seconds  |  stands for microseconds
 
 
 
How i have to look for it on the cheat engine ?? 
 
 
 
TNX.
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Zanzer I post too much
  Reputation: 126
  Joined: 09 Jun 2013 Posts: 3278
 
  | 
		
			
				 Posted: Thu Nov 26, 2015 10:07 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				Some standard ways to store time are:
 
As a float/double representing the number of seconds (sometimes milliseconds).
 
As a 4-byte/8-byte representing the number of milliseconds.
 
 
I'm not sure you understand what microsecond means.
 
Does that number count up to 1,000,000 before changing that 14 to a 15?  
 
Or does it only count to 1,000 (milliseconds)?
 
Or, worse, do you only see it count up to 100?
 
 
Anyway, convert that time into a single value.
 
 
For total seconds, calculate: minutes * 60 + seconds
 
Then, tell CE to search for a range between +/- 1 of that value
 
 
For total milliseconds, calculate: (minutes * 60 + seconds) * 1000 + milliseconds
 
For this, best to tell CE to search for a range between +/- 1000 of that value.
 
 
So in your example:
 
 
Seconds = 0 * 60 + 14 = 14
 
Search for a float between 13 and 15
 
 
Milliseconds = (0 * 60 + 14) * 1000 + 39 = 14039
 
Search for a 4-byte between 13000 and 15000
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kokkinogenis Advanced Cheater
  Reputation: 0
  Joined: 10 Sep 2015 Posts: 82 Location: Greece
  | 
		
			
				 Posted: Thu Nov 26, 2015 1:35 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				| Ok, i did it ! Thank you very very much !!
 | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |