Coder Social home page Coder Social logo

justmaiklas / fivem-handling-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carmineos/fivem-handling-editor

0.0 0.0 0.0 3.69 MB

A script for FiveM servers to allow the clients to edit the handling of the vehicles

Home Page: https://forum.fivem.net/t/release-c-handling-editor/127548

License: MIT License

C# 99.91% Batchfile 0.09%

fivem-handling-editor's Introduction

Handling Editor

Master Development
Build status Build status

Description

A script which allows to edit the handling of each vehicle individually using FiveM API and MenuAPI .

When a client edits a vehicle, it will be automatically synchronized with all the players using decorators.

The default key to open the menu is F7

Features

  • Edit the values of the handling's fields (scroll the list or press Enter to insert custom values)
  • Customizable min and max allowed values for each field
  • Load presets from a server resource file
  • Save and Load presets locally for each client

Supported Classes

  • CHandlingData

Supported Types

  • Float
  • Vector3

Other Limitations

  • Some fields don't seem to have any effect after being edited
  • Some fields require the car to move a bit or to be damaged to update after being edited
  • Some Int fields have a wrong type in the ExtraNative, so I disabled them ( nInitialDriveGears )
  • Flags fields aren't supported yet
  • Some of these fields above work if edited globally (but editing globally doesn't give the smoothest experience, if more clients edit a fields in different way)

Client Commands

handling_preset Prints the preset of the current vehicle

handling_decorators Prints the info about decorators on the current vehicle

handling_decorators <int> Prints the info about decorators on the vehicle with the specified int as local handle

handling_print Prints the list of all the vehicles with any decorator of this script

handling_range <float> Sets the specified float as the maximum distance used to refresh wheels of the vehicles with decorators

handling_debug <bool> Enables or disables the logs to be printed in the console

Handling Presets

The HandlingPresets.xml is the file which contains the handlings you want to preload for each client. The script will load them and each client will be able to apply them to their current vehicle. I will add an option to let the client use each preset only if the model of the vehicle is the same. NOTE: The presets require an attribute called presetName to be loaded by the script, check the included example.

Handling Info

The HandlingInfo.xml is the file which controls how the script handles each handling field. You can set for each field if you want it to be editable by the clients of your server by editing the Editable field. You can also set custom Min and Max allowed values and edit the Description of each field.

Config

toggleMenu=168 The Control to toggle the Menu, default is 168 which is F7 (check the controls list)

FloatStep=0.01 The step used to increase and decrease a value

ScriptRange=150.0 The max distance within which each client refreshes others clients' vehicles

timer=1000 The value in milliseconds used by each client to check if its preset requires to be synched again

debug=false Enables the debug mode, which prints some logs in the console

WIP

  • Once FiveM API will include a GET_HANDLING_* to get the global values for each model I could avoid storing default values with decorators.
  • Support for all the handling classes (once FiveM adds the support to their Natives)
  • Blacklist/Whitelist for vehicle classes and/or individual vehicle models

Source Download I am open to any kind of feedback. Report suggestions and bugs you find.

Build

Open the postbuild.bat and edit the path of the resource folder. If in Debug configuration, the post build event will copy the following files to the specified path: the script, the config.ini, the HandlingInfo.xml, the HandlingPresets.xml, the __resource.lua and a copy of a built MenuAPI

Credits

fivem-handling-editor's People

Contributors

carmineos avatar neos7 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.