Giter Site home page Giter Site logo

drift-script's Introduction

Drift Script

Intro

A simple drift-mode script for fiveM. Toggle the drifting mode with shift. The script works by changing handling variables of the active vehicle.

Configuration

Configuration is stored in the handleMods array:

local handleMods = {
	{"fInitialDragCoeff", 90.22},
	{"fDriveInertia", .31},
	{"fSteeringLock", 22},
	{"fTractionCurveMax", -1.1},
	{"fTractionCurveMin", -.4},
	{"fTractionCurveLateral", 2.5},
	{"fLowSpeedTractionLossMult", -.57}
}

Old readme below

First proper and public drift script for FiveM! Use and share as you like.

Script works on simple principle - increasing and decreasing values in handling model in real time upon pressing left Shift.

Applies appropriately for AWD vehicles too.

Drift script works the best with semi-realistic handlings. If you have a shitty handling by default, drifting will be shitty as well, unless you will make changes in values yourself.

By default, the drift script is only allowed for road and personal vehicles. I really wasn't interested to see drifting busses, but if you will change the code, anything's possible, right?

Bugs:

Some vehicles can upon hitting drift settings got stuck on the spot and wheels will disappear. One of the value isn't converted as a solely number anymore. Look at the print in your client's console, to see something like

0.512335abE

Solution:

Simply change car's default value in it's handling file by few units -

instead of

0.511112

to

0.511110

This will solve the problem with vehicle getting incorrect values.

We had a lot of fun with whole FiveM community and I am pleased to share this with all of you! Code is originally made by me and further optimizations by VoidMods Void. Use and share as you like. If you want to make me happy, throw below in comments some videos featuring the script! :)

drift-script's People

Contributors

moravianlion avatar voidmods avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.