TextDraw Speed meter
#1

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
Reply
#2

Easy lmao, pm me
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=641735
https://sampforum.blast.hk/showthread.php?tid=435751
https://sampforum.blast.hk/showthread.php?tid=545128

And if you keep searching...
Reply
#4

/del
Reply
#5

I have a question. How to do it and is it best to do it in OnPlayerUpdate or OnPlayerStateChange?
Reply
#6

Quote:
Originally Posted by KamilPolska
View Post
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.
Reply
#7

I understand. But can also use SetTimer in OnGameModeInit and not OnPlayerUpdate, right?
Reply
#8

Quote:
Originally Posted by KamilPolska
View Post
I understand. But can also use SetTimer in OnGameModeInit and not OnPlayerUpdate, right?
Yeah, that will also work.
Reply
#9

Okay. I did. And you know how can do, for example, the speed reaches 50, it changes to a different color.
Reply
#10

Don't use OnPlayerUpdate for such things. I've seen many people having the same question.

One example is in this topic

https://sampforum.blast.hk/showthread.php?tid=591965

There are also plenty of speedometer scripts available as an example. The color part should be easier. Search for a decent speedometer script and see how it works, then just add your own textdraw and change the colors according to the speed.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)