[Include] dth_vehspeed - Control the speed of a vehicle
#1

dth_vehspeed v0.3 - Control the speed of a vehicle
With that include easily control the vehicle speed of your server.
Contents :
  • 6 functions (3 macros)
Informations :
As you will see in the parameters of 2 functions, you will be asked if you want to call these functions in km/h or mp/h.

PHP код:
native ConvertKmhToMph(const kmh);
native ConvertMphToKmh(const mph);
native GetVehicleSpeed(const vehicleid, const dth_speed_unit:unit=kmh);
native SetVehicleSpeed(const vehicleidspeed, const dth_speed_unit:unit=kmh);
native GetSpeedByMilliseconds(const speed, const milliseconds);
native GetVehicleModelTopSpeed(const modelid); 
With these functions, you can create a speedometer, a speed limiter, cruise control, and mileage system easily.

Download :





Cruise control made by Sellize with this include :
[ame]http://www.youtube.com/watch?v=plVOzpO5iPM[/ame]
Reply
#2

Nice one!
Keep on with great work!
Reply
#3

Edit: Wrong post
Reply
#4

Include updated, adding function :
PHP код:
native GetSpeedByMilliseconds(const speed, const milliseconds); 
Useful for a mileage system.
Reply
#5

Can this system make faster vehicles or just limit speed?
Reply
#6

Good Job !
Reply
#7

Quote:
Originally Posted by iWhite
Посмотреть сообщение
Can this system make faster vehicles or just limit speed?
You can do both.
Quote:
Originally Posted by LazyBoyyyy
Посмотреть сообщение
Good Job !
Thanks!
Reply
#8

Include updated, adding function :
PHP код:
native GetVehicleModelTopSpeed(const modelid); 
Reply
#9

Perhaps you should prevent the bug at the end? XD

1. White screen of death.
2. It thought you were at the bomb shop.
3. It didn't make you go the speed specified.

I really like this though, the speed is still off a bit (as are all other speedo scripts and mine), but it's only GTASA. Also you could get more advanced into the speed. Like, if we were falling this script would return the terminal velocity. You should make it so it only detects actually movement speed and not displacement speed.


EDIT: Why aren't you using float values?!!?!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)