Posts: 284
Threads: 78
Joined: May 2016
Reputation:
0
Hey. I am looking for and I can not find an interesting script on the speed meter. I wanted a speed meter with colors.
E.g:
0 km/h - 82 km/h - Green color
83 km/h - 101 km/h - Light green color
102 km/h - 123 km/h - Yellow color
124 km/h - 144 km/h - Orange color
145 km/h - 173 km/h - Dark orange color
174 km/h - MAX km/h - Red color
Posts: 284
Threads: 78
Joined: May 2016
Reputation:
0
I have a question. How to do it and is it best to do it in OnPlayerUpdate or OnPlayerStateChange?
Posts: 357
Threads: 6
Joined: Feb 2018
Quote:
Originally Posted by KamilPolska
I have a question. How to do it and is it best to do it in OnPlayerUpdate or OnPlayerStateChange?
|
OnPlayerStateChange is to show the textdraw and hide it (Detects if player is in vehicle or not)
OnPlayerUpdate can also be used to update the textdraw.
Posts: 284
Threads: 78
Joined: May 2016
Reputation:
0
I understand. But can also use SetTimer in OnGameModeInit and not OnPlayerUpdate, right?
Posts: 357
Threads: 6
Joined: Feb 2018
Quote:
Originally Posted by KamilPolska
I understand. But can also use SetTimer in OnGameModeInit and not OnPlayerUpdate, right?
|
Yeah, that will also work.
Posts: 284
Threads: 78
Joined: May 2016
Reputation:
0
Okay. I did. And you know how can do, for example, the speed reaches 50, it changes to a different color.