[STANDALONE] zm - Gears system (All in one)

image

Hello everyone

In this post I’ll share the gears system that i made.

Features click here
  • You can define what vehicle you want automatic or model or if instead automatic you want the manual system for the vehicle this is configurable from config.lua.

  • Close/open the vehicle // Left/Right/Both turn lights // Close/Open the hood and trunk

  • Broke the gears system if the users do some fails when change the gear.

  • Super low MS // Optimized

  • UI very nice made by GitHub - vladispavlov/html5-canvas-speedometer: Fully functional car speedometer created with pure JavaScript and HTML5 Canvas

  • The UI has icons that they are interactive with RegisterKeyMapping

  • There is a exports that you can use for fix the vehicle (This is good for example, for mechanic job )

  • Totally configurable from config.lua

  • You can’t use a lock velocity because this script block the velocity according to gear

  • Translated to English and Spanish

  • The sound when users or the user is not wearing a seat belt is synchronized among all players that are near or inside the vehicle.

  • When the user that are in the vehicle or try to enter in it, the gears will synchronized between all the occupant in the vehicle

Config. lua click here
 Config = {}

Config.GeneralMaxGear = 6

Config.Velocity = 3.6 -- 2.236936 MPH or 3.6 KPH

Config.MaxFails = 6 --Max fails for break gears / Número máximo de fallos para romper la caja de cambios

Config.consumefuel = 20 
-- Cuanto se consume de gasolina con el motor encendido
-- How much gasoline is consumed with the engine running

Config.consumefueladvanced = 100
-- Cuanto se consume de gasolina con el motor encendido y el vehiculo propulsado
-- How much gasoline is consumed when the engine is running and the vehicle is propelled.


Config.NoCarsManualGears = {
	--"ZENTORNO"
}


-- When the player fails in the gears (Only when upshifting), if this is true, this will cause the engine to stop and the current gear is 0.
-- Cuando el jugador falla en las marchas (Sólo cuando sube de marcha), si esto es cierto, esto hará que el motor se pare y la marcha actual sea 0.
Config.FeelTheFail = true


-- When the player has the wrong gear set, then the vehicle's engine will start taking damage until it is on fire.
-- Cuando el jugador tiene puesta mal la marcha, entonces el motor del vehículo empezará a recibir daño hasta estar en llamas.
Config.EngineDamage = true

-- How much damage the motor will receive when the above happens.
-- Cuánto daño recibirá el motor cuando ocurra lo anterior.
Config.HowMuchEngineDamage = 0.01


-- If this is false, no one can use the commands, but if true everyone can use them
-- Si esto es falso (false), nadie puede usar los comandos, pero si está en verdadero (true) todos pueden usarlos

Config.noallowcommand = false 


Config.NoModelCarsManualGears = {
--	0, --Compacts  
--	1, --Sedans  
--	2, --SUVs  
--	3, --Coupes  
--	4, --Muscle  
--	5, --Sports Classics  
--	6, --Sports  
--	7, -- Super
--	8, --Motorcycles  
--	9, --Off-road  
--	10, --Industrial  
--	11, --Utility  
--	12, --Vans  
--	13, --Cycles  
--	14, --Boats  
--	15, --Helicopters  
--	16, --Planes  
--	17, --Service  
--	18, --Emergency  
--	19, --Military  
--	20, --Commercial  
--	21 --Trains
}



Config.Table = "owned_vehicles"

Config.OwnerColumnName = "owner"

Config.PlateColumnName = "plate"


-- If true, it means that the Steam: and license prefixes will be removed:
-- when the user identifier is obtained
Config.removerprefijos = false


-- If it is true, the FiveM identification system will be used
-- If it is false, the Steam identification system will be used
-- Si está a true, El sistema de identificación de FiveM será usado
-- Si está a false, El sistema de identificación de Steam será usado
Config.license = false



-- TRANSLATE // TRADUCCIONES
--[[ -- REMOVE THIS LINE IF YOU WANT THIS TRANSLATE
Config.sm = "Up gear"
Config.bm = "Down gear"
Config.belt = "Belt"
Config.close = "Close/Open vehicle"
Config.lr = "Light right"
Config.ll = "Light left"
Config.lb = "Both lights"
Config.hood = "Hood"
Config.trunk = "Trunk"
]]--   -- REMOVE THIS LINE IF YOU WANT THIS TRANSLATE
----------------------------------

--[[ -- Quita esta línea para establecer el idioma a español
Config.sm = "Subir marcha"
Config.bm = "Bajar marcha"
Config.belt = "Cinturon"
Config.close = "Cerrar/Abrir vehiculo"
Config.lr = "Intermitente derecho"
Config.ll = "Intermitente izquierdo"
Config.lb = "Ambos intermitentes"
Config.hood = "Capó"
Config.trunk = "Maletero"
]]  -- Quita esta línea para establecer el idioma a español

If you have questions, send me a DM or post a comment and I will give an answer to your question

Requirements:

  • mysql-async (It’s free)

Preview

Preview

Buy script 5€ + Tebex tax

Buy script in Tebex

Other scripts:

Zcarreras V2 Create races easier and run on it with a lot player!

2 Likes

I don’t like it, it’s my opinion, but why don’t revs work on the speedometer?

Thanks for giving me your opinion and for posting a comment, I really appreciate it. About the revolutions, it was working before, but I will fix it soon.

Best regards

Little update:

  • Now the revolutions work as they should

Preview about the revs fixed

They don’t seem to work as they should tho, look at how the revs are behaving when you start your car

ms < 16 ? is not optimezed

Update:

  • Revolutions corrected

  • Improved script optimization

Added new features such as

  • Now the player can break the engine

  • More options to configure the script. You can see it in the Config.lua in the first post.

Preview:

Thanks @ShahZaM and @Oswaldi for telling me the problems.

I hope I have solved them

Preview doesn’t load for me, I would upload any kind of video preview to YouTube but hey, that’s me.

Sorry, it is already uploaded to YouTube:

Corrected revolutions and better optimization / zm - Gears System - YouTube

Hope you can watch the video now

its privat sir :slight_smile:

I’m so sorry, now is public

Revs seem to be fixed, tho you could update them more frequently? But that’s just me being picky about it, good job.

Of course, no problem. I did.

Update:

  • Synchronize revs with speed.

  • Added sound when driver changes gear (up or down).

Gear shift preview:

Synchronize revs with speed and sound when shifting gears.

I hope you like my script now and thanks :smiley:

Best regards

1 Like