Giter Site home page Giter Site logo

null_offroad's Introduction

null_offroad

This script will adjust the handling of a specific vehicle when they go off-road, making it harder to accelerate, steer and break. It is completely standalone but can be integrated into a framework easily.

How does it work?

This script will reduce grip, breaking and steering when driving offroad with a vehicle that should not be able to do that. By default I only configured the “Offroad” vehicle class to bypass the script, but you can add classes from the list found here, just add the number to the array.

The script includes adding specific vehicle models to the bypass list, I made a user-friendly command to do so. All you have to do is step into the vehicle and use the /offroad command. The command also includes checking the current status and all vehicles you add are saved in a database table. The script creates this table for your convenience. Please note that adding vehicles in runtime only works when the SQL option is enabled. You can always configure vehicles directly in the configuration if you prefer that.

The command includes a debug option, you can turn this on (will reduce performance drastically on the person who has it enabled) to see if you are driving on a road, what material the road is and if the effect is applied. You can add the material number to the Config.GripRoads array to include them as roads. In order to use this command, the user is required to have the command.offroad ace granted.

If you know what you are doing, feel free to adjust these 6 lines to change the effect of the script. The script could have problems if you changed the sv_filterRequestControl server variable, but this is untested.

Features

If you would like to see more features added, please reply on the FiveM post or create an issue to make a suggestion!


  • Standalone
  • Debugging Mode (Material type, effect info and road info)
  • Optimized code (0.00-0.01ms)
  • Synchronized between clients
  • Configure what vehicle classes can go off-road
  • Configure what material is considered on-road
  • Uses state bags to store information, so you can safely restart the script1
  • Automatically handles database tables2
  • Add and remove vehicle as exception with command in-game (updated live)2

1 The key of the statebag used to check if the effect is applied on a vehicle entity is noGrip
2 This feature requires OxMySQL to be installed and working

Dependencies

  • OneSync enabled

Issues & Contributing

If you are experiencing any trouble while using the script, please reply to the FiveM post or create an issue on the GitHub page. If you think you can solve the issue yourself feel free to open a pull request. Any other contributions are also welcome.

For questions and requests you can add me on Discord: nullifiedd

License

Please respect the license, you can read more about it here.

null_offroad's People

Contributors

gittified avatar

Stargazers

Blazej Gantz avatar  avatar  avatar Mundstock avatar DX HIGH avatar  avatar Player - X avatar Ballenbakpoeper avatar  avatar Maurice Handwerker avatar  avatar Eduard A. avatar  avatar Eivor avatar Edwin IT avatar TheNewCity avatar  avatar Darka avatar Tico™ avatar

Watchers

 avatar TheNewCity 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.