[FilterScript] [RP] Vehicle GEAR Changes [REALISTIC DRIVING]
#1

Vehicle Gear changes v0.2
Information - This is quite a heavy RP feature you can add to your server which includes 6 Manual Gear changes and speedometer in a Textdraw. It's also great for video editing and NPC making, you can set your vehicle to a lower gear for a smooth ride!

[ame]http://www.youtube.com/watch?v=9bS59lmXdgw[/ame]

- How to use
• Players can use by default(KEY_YES) to change up a gear and (KEY_NO) to go down a gear.
• RED Coloured gears means you can not change up until it is GREEN
• You must reach the right speed to change to the next gear (#define GEAR1_SPEED 20)
Code:
Default gear speed changes:
Engine off -> Gear 1 = 0
Gear 1 -> Gear 2 = 20
Gear 2 -> Gear 3 = 40
Gear 3 -> Gear 4 = 60
Gear 4 -> Gear 5 = 75
Gear 5 -> Gear 6 = 95
• Not as good/fast cars may not be able to reach 6th Gear, like IRL some cars do not have 6 Gears.
• You can turn the engine off when you shift down past Gear 1 or on if you go into Gear 1
• Lower gears have lower speeds, in order to reach the vehicles top speed you must be in Gear 6.
• Players can drive slower wherever they want instead of tapping 'W', just put the car into the desired gear.
• Optional more hardcore gear control. Set to "true" to enable damage if your vehicles RPM is too high for the gear.

Installation -
• Upload vGears.amx to your server 'filterscripts' folder.
• Add 'vGears' to your server.cfg filterscripts line

Known/possible bugs -
• When you enter a vehicle for the first time, gears might not have an effect. To fix Press Y and then N.
This is because the engine might not be turning off correctly.

• Please report more if you can!

Updates -
Update v0.2:

•You now have the option to set gear damage. Having this on will damage the vehicle if they have the RPM too high. By default it is on "false" so set it to "true" if you would like this.
Code:
new bool:DefaultGearDamage = false;
•There is a define for how many times the vehicle can withstand too high RMP before it gets damaged. You can change this by setting it to a lower or higher number. After the default 10 times if they continue to use the gears wrong they will set the vehicle health -50 each time.
Code:
#define DAMAGE_COUNT 10
•I'm working on a better gear system much like real life; If you start in a high gear(e.g. 6) it will take a lot longer to accelerate to the vehicles top speed. I'm not exactly sure how I'm going to go about doing this yet but for now by default if you are in gear 2+ and your speed drops to 0, your gears will reset back to 1.

If you would like to remove this until I come up with an affective way of properly doing this you can remove the following at lines 421-426:
Code:
if(vGear[playerid] >= 2 && GetPlayerSpeed(playerid) == 0)
	{
 		vGear[playerid] = 1;
 		SetPlayerSpeedCap(playerid, 0.1);
		TextDrawSetString(Gear[playerid], "~r~1");
	}
Download -
v0.2 DIRECT DOWNLOAD
v0.2 PASTEBIN

v0.1 DIRECT DOWNLOAD
v0.1 PASTEBIN

Credits -
Speed limiter provided by Slice
https://sampforum.blast.hk/showthread.php?tid=179089

NOTE: If anyone has a good Race server and is going to use it I'd be really interested in trying it out with a few other players!
Reply
#2

What a great FS. I'll test
Reply
#3

Wow nice
Reply
#4

i liked the FS a lot but on reversing, how does it work? didnґt see that neither on the video or on the info ^^
Reply
#5

really realistitcs
Reply
#6

Quote:
Originally Posted by Delta 4
View Post
i liked the FS a lot but on reversing, how does it work? didnґt see that neither on the video or on the info ^^
That's the only thing missing from it, and neutral of course. You can put it into 1st gear and reverse.

@Everyone else: Thanks.
Reply
#7

A W E S O M E
Reply
#8

What button to gear up and gear down?
Reply
#9

Quote:
Originally Posted by Jizz
View Post
What button to gear up and gear down?
Y - gear up
N- gear down
Reply
#10

How to change the key button?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)