SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 14/08/2015, 05:47 PM   #1
Dutheil
Gangsta
 
Dutheil's Avatar
 
Join Date: Jul 2014
Location: France
Posts: 508
Reputation: 221
Default dth_vehspeed - Control the speed of a vehicle

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 Code:
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.*******.com/watch?v=plVOzpO5iPM[/ame]
__________________
#PrayForFrenchForum
GitHub

pawn Code:
print({1466458484, 543452960, 2037347616, 1952999790, 1797286260, 544694643, 543649646, 1851859053, 1634428192, 1056964608});

Last edited by Dutheil; 18/08/2015 at 06:41 PM.
Dutheil is offline   Reply With Quote
Old 14/08/2015, 06:33 PM   #2
kalanerik99
Huge Clucker
 
kalanerik99's Avatar
 
Join Date: Mar 2012
Location: Slovenia
Posts: 473
Reputation: 9
Default Re: dth_vehspeed - Control the speed of a vehicle

Nice one!
Keep on with great work!
__________________


UGF
Unlimited GTA Freeroam

Freeroam - Deathmach - Race -Stunts



kalanerik99 is offline   Reply With Quote
Old 15/08/2015, 12:33 AM   #3
JR_Junior
Huge Clucker
 
Join Date: Nov 2011
Location: Brazil
Posts: 216
Reputation: 54
Default Re: dth_vehspeed - Control the speed of a vehicle

Edit: Wrong post
JR_Junior is offline   Reply With Quote
Old 15/08/2015, 12:39 AM   #4
Dutheil
Gangsta
 
Dutheil's Avatar
 
Join Date: Jul 2014
Location: France
Posts: 508
Reputation: 221
Default Re : dth_vehspeed - Control the speed of a vehicle

Include updated, adding function :
PHP Code:
native GetSpeedByMilliseconds(const speed, const milliseconds); 
Useful for a mileage system.
__________________
#PrayForFrenchForum
GitHub

pawn Code:
print({1466458484, 543452960, 2037347616, 1952999790, 1797286260, 544694643, 543649646, 1851859053, 1634428192, 1056964608});
Dutheil is offline   Reply With Quote
Old 15/08/2015, 10:29 AM   #5
iWhite
Big Clucker
 
Join Date: May 2012
Posts: 176
Reputation: 18
Default Re: dth_vehspeed - Control the speed of a vehicle

Can this system make faster vehicles or just limit speed?
iWhite is offline   Reply With Quote
Old 15/08/2015, 10:48 AM   #6
LazyB0y
Huge Clucker
 
LazyB0y's Avatar
 
Join Date: Feb 2014
Location: Pakistan
Posts: 276
Reputation: 15
Default Re: dth_vehspeed - Control the speed of a vehicle

Good Job !
__________________
LazyB0y is offline   Reply With Quote
Old 18/08/2015, 12:51 PM   #7
Dutheil
Gangsta
 
Dutheil's Avatar
 
Join Date: Jul 2014
Location: France
Posts: 508
Reputation: 221
Default Re : dth_vehspeed - Control the speed of a vehicle

Quote:
Originally Posted by iWhite View Post
Can this system make faster vehicles or just limit speed?
You can do both.
Quote:
Originally Posted by LazyBoyyyy View Post
Good Job !
Thanks!
__________________
#PrayForFrenchForum
GitHub

pawn Code:
print({1466458484, 543452960, 2037347616, 1952999790, 1797286260, 544694643, 543649646, 1851859053, 1634428192, 1056964608});
Dutheil is offline   Reply With Quote
Old 18/08/2015, 06:43 PM   #8
Dutheil
Gangsta
 
Dutheil's Avatar
 
Join Date: Jul 2014
Location: France
Posts: 508
Reputation: 221
Default Re : dth_vehspeed - Control the speed of a vehicle

Include updated, adding function :
PHP Code:
native GetVehicleModelTopSpeed(const modelid); 
__________________
#PrayForFrenchForum
GitHub

pawn Code:
print({1466458484, 543452960, 2037347616, 1952999790, 1797286260, 544694643, 543649646, 1851859053, 1634428192, 1056964608});
Dutheil is offline   Reply With Quote
Old 19/08/2015, 12:17 AM   #9
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,372
Reputation: 652
Default Re: dth_vehspeed - Control the speed of a vehicle

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?!!?!
Crayder is offline   Reply With Quote
Old 30/04/2019, 06:36 AM   #10
lenlvn
Little Clucker
 
Join Date: Jan 2017
Posts: 1
Reputation: 0
Default Re: dth_vehspeed - Control the speed of a vehicle

Good
lenlvn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] SA-MP 0.3c Vehicle Control System (Control everything, you want) Auxxx Filterscripts 78 09/10/2012 10:40 PM
[FilterScript] [Map] Speed Control/Toll Lv [LHT]Bally Filterscripts 42 20/03/2012 08:17 PM
control the sprint speed of a player Amine_Mejrhirrou Help Archive 13 10/06/2011 12:23 AM


All times are GMT. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.