{"id":48299876,"url":"https://github.com/carmineos/fivem-vstancer","last_synced_at":"2026-04-04T23:43:39.977Z","repository":{"id":54749422,"uuid":"120902744","full_name":"carmineos/fivem-vstancer","owner":"carmineos","description":"ikt's VStancer as resource for FiveM servers to synchronize the edited vehicles with all the players.","archived":false,"fork":false,"pushed_at":"2021-03-01T18:56:19.000Z","size":3510,"stargazers_count":37,"open_issues_count":8,"forks_count":73,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-03-10T09:27:05.766Z","etag":null,"topics":["fivem"],"latest_commit_sha":null,"homepage":"https://forum.fivem.net/t/release-c-vstancer/79219","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carmineos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"carmineos","custom":"https://www.paypal.me/carmineos"}},"created_at":"2018-02-09T12:24:45.000Z","updated_at":"2023-03-04T05:22:18.000Z","dependencies_parsed_at":"2022-08-14T01:40:20.580Z","dependency_job_id":null,"html_url":"https://github.com/carmineos/fivem-vstancer","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/carmineos/fivem-vstancer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmineos%2Ffivem-vstancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmineos%2Ffivem-vstancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmineos%2Ffivem-vstancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmineos%2Ffivem-vstancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carmineos","download_url":"https://codeload.github.com/carmineos/fivem-vstancer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carmineos%2Ffivem-vstancer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31419543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fivem"],"created_at":"2026-04-04T23:43:39.879Z","updated_at":"2026-04-04T23:43:39.955Z","avatar_url":"https://github.com/carmineos.png","language":"C#","funding_links":["https://patreon.com/carmineos","https://www.paypal.me/carmineos"],"categories":[],"sub_categories":[],"readme":"# VStancer\n|Master|Development|\n|:-:|:-:|\n|[![Build status](https://ci.appveyor.com/api/projects/status/qialhqew9j0i9528/branch/master?svg=true)](https://ci.appveyor.com/project/carmineos/fivem-vstancer/branch/master) |[![Build status](https://ci.appveyor.com/api/projects/status/qialhqew9j0i9528/branch/development?svg=true)](https://ci.appveyor.com/project/carmineos/fivem-vstancer/branch/development)|\n\n### Description\nAn attempt to use the features from ikt's VStancer as resource for FiveM servers to synchronize the edited vehicles with all the players. It is built using FiveM API and MenuAPI.\n\nWhen a client edits a vehicle, it will be automatically synchronized with all the players.\nIf a vehicle is reset to the default values it will stop from being synchronized.\nThe synchronization is made using decorators.\n\nThe default key to open the menu is F6\n\n### Glossary\n* **Track Width**: It's the X offset of the vehicle's wheels bones in the entity local coords system. Because wheels model are rotated it means to have a positivie Track Width you have to assign a negative value.\n* **Camber**: It's the Y rotation of the vehicle's wheels bones in the entity local coords system.\n* **Wheel Mod**: It refers to a custom wheel you can apply on a vehicle from in-game tuning features. Since this term can create ambiguity with custom assets mods (wheel modifications), we will refers to these as \"tuning wheels\" and to game modifications as \"wheel mods\"\n\n### Features of the script\n* Edit Track Width of vehicles\n* Edit Camber of vehicles\n* Edit Tuning Wheel Size of vehicles (Requires a tuning wheel to be installed on the vehicle)\n* Edit Tuning Wheel Width of vehicles (Requires a tuning wheel to be installed on the vehicle)\n* Manage presets\n\n### Note\nWhen a preset is created for the first time, it will use the current wheels' state as default. So in case of damaged vehicles (e.g. deformed wheels), the default values might be incorrect. \nWorkaround: If a vehicle is damaged, be sure to fix it before to enter it and create a preset. (e.g. reset preset, fix the vehicle, exit the vehicle and enter again) \n\n### Client Commands\n* `vstancer_preset`: Prints the preset of the current vehicle\n* `vstancer_decorators`: Prints the info about decorators on the current vehicle\n* `vstancer_decorators \u003cint\u003e`: Prints the info about decorators on the vehicle with the specified int as local handle\n* `vstancer_print`: Prints the list of all the vehicles with any decorator of this script\n* `vstancer_range \u003cfloat\u003e`: Sets the specified float as the maximum distance used to refresh wheels of the vehicles with decorators\n* `vstancer_debug \u003cbool\u003e`: Enables or disables the logs to be printed in the console\n* `vstancer`: Toggles the menu, this command has to be enabled in the config\n\n### Config\n* `Debug`: Enables the debug mode, which prints some logs in the console\n* `DisableMenu`: Allows to disable the menu in case you want to allow editing in your own menu using the provided API\n* `ExposeCommand`: Enables the /vstancer command to toggle the menu\n* `ExposeEvent`: Enable the \"vstancer:toggleMenu\" event to toggle the menu\n* `ScriptRange`: The max distance within which each client refreshes edited vehicles\n* `Timer`: The value in milliseconds used by each client to do some specific timed tasks\n* `ToggleMenuControl`:The Control to toggle the Menu, default is 167 which is F6 (check the [controls list](https://docs.fivem.net/game-references/controls/))\n* `FloatStep`: The step used to increase and decrease a value\n* `EnableWheelMod`: Enables the script to edit wheel size and width of tuning wheels\n* `EnableClientPresets`: Enables the script to manage clients' presets\n* `WheelLimits`:\n    * `FrontTrackWidth`: The max value you can increase or decrease the front Track Width from its default value\n    * `RearTrackWidth`: The max value you can increase or decrease the rear Track Width from its default value\n    * `FrontCamber`: The max value you can increase or decrease the front Camber from its default value\n    * `RearCamber`: The max value you can increase or decrease the rear Camber from its default value\n* `WheelModLimits`:\n    * `WheelSize`: The max value you can increase or decrease the size of tuning wheels from its default value\n    * `WheelWidth`: The max value you can increase or decrease the width of tuning wheels from its default value\n\n### Exports\nThe script exposes some API to manage the main features from other scripts:\n\n```csharp\nbool SetWheelPreset(int vehicle, float frontTrackWidth, float frontCamber, float rearTrackWidth, float rearCamber);\nfloat[] GetWheelPreset(int vehicle);\nbool ResetWheelPreset(int vehicle);\nfloat[] GetFrontCamber(int vehicle);\nfloat[] GetRearCamber(int vehicle);\nfloat[] GetFrontTrackWidth(int vehicle);\nfloat[] GetRearTrackWidth(int vehicle);\nbool SetFrontCamber(int vehicle, float value);\nbool SetRearCamber(int vehicle, float value);\nbool SetFrontTrackWidth(int vehicle, float value);\nbool SetRearTrackWidth(int vehicle, float value);\nbool SaveClientPreset(string presetName, int vehicle);\nbool LoadClientPreset(string presetName, int vehicle);\nbool DeleteClientPreset(string presetName);\nstring[] GetClientPresetList();\n```\n\n**NOTE**\nCurrent API don't support editing of tuning wheel data (wheelSize and wheelWidth) yet.\n\n#### Remember that API require the resource to be called exactly “vstancer”\n**API Usage**\n\n* **SetWheelPreset**\n    * int vehicle: the handle of the vehicle entity\n    * float frontTrackWidth: the value you want to assign as front track width \n    * float frontCamber: the value you want to assign as front camber\n    * float rearTrackWidth: the value you want to assign as rear track width \n    * float rearCamber: the value you want to assign as rear camber\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].SetWheelPreset(vehicle, frontTrackWidth, frontCamber, rearTrackWidth, rearCamber);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:SetWheelPreset(vehicle, frontTrackWidth, frontCamber, rearTrackWidth, rearCamber)\n    ```\n\n    \u003c/details\u003e\n* **GetWheelPreset**\n    * int vehicle: the handle of the vehicle entity\n    * float result: the array containing the oreset values in this order frontTrackWidth, frontCamber, rearTrackWidth, rearCamber.\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n    \n    C#:\n    ```csharp\n    float[] result = Exports[\"vstancer\"].GetWheelPreset(vehicle);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:GetWheelPreset(vehicle);\n    ```\n    \n    \u003c/details\u003e\n* **ResetWheelPreset**\n    * int vehicle: the handle of the vehicle entity\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n\n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n    \n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].ResetWheelPreset(vehicle);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:ResetWheelPreset(vehicle);\n    ```\n    \n    \u003c/details\u003e\n* **GetFrontCamber**\n    * int vehicle: the handle of the vehicle entity\n    * float[] frontCamber: an array which contains the value as first element if the request has success, otherwise is empty\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n    \n    C#:\n    ```csharp\n    float[] frontCamber = Exports[\"vstancer\"].GetFrontCamber(vehicle);\n    ```\n    Lua:\n    ```lua\n    local frontCamber = exports[\"vstancer\"]:GetFrontCamber(vehicle);\n    ```\n    \n    \u003c/details\u003e\n* **GetRearCamber**\n    * int vehicle: the handle of the vehicle entity\n    * float[] rearCamber: an array which contains the value as first element if the request has success, otherwise is empty\n\n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n    \n    C#:\n    ```csharp\n    float[] rearCamber = Exports[\"vstancer\"].GetRearCamber(vehicle);\n    ```\n    Lua:\n    ```lua\n    local rearCamber = exports[\"vstancer\"]:GetRearCamber(vehicle);\n    ```\n    \n    \u003c/details\u003e\n* **GetFrontTrackWidth**\n    * int vehicle: the handle of the vehicle entity\n    * float[] frontTrackWidth: an array which contains the value as first element if the request has success, otherwise is empty\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n    \n    C#:\n    ```csharp\n    float[] frontTrackWidth = Exports[\"vstancer\"].GetFrontTrackWidth(vehicle);\n    ```\n    Lua:\n    ```lua\n    local frontTrackWidth = exports[\"vstancer\"]:GetFrontTrackWidth(vehicle);\n    ```\n    \n    \u003c/details\u003e\n* **GetRearTrackWidth**\n    * int vehicle: the handle of the vehicle entity\n    * float[] rearTrackWidth: an array which contains the value as first element if the request has success, otherwise is empty \n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n    \n    C#:\n    ```csharp\n    float[] rearTrackWidth = Exports[\"vstancer\"].GetRearTrackWidth(vehicle);\n    ```\n    Lua:\n    ```lua\n    local rearTrackWidth = exports[\"vstancer\"]:GetRearTrackWidth(vehicle);\n    ```\n    \n    \u003c/details\u003e\n* **SetFrontCamber**\n    * int vehicle: the handle of the vehicle entity\n    * float frontCamber: the value you want to assign as front camber\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].SetFrontCamber(vehicle, frontCamber);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:SetFrontCamber(vehicle, frontCamber);\n    ```\n\n    \u003c/details\u003e\n* **SetRearCamber**\n    * int vehicle: the handle of the vehicle entity\n    * float rearCamber: the value you want to assign as rear camber\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].SetRearCamber(vehicle, rearCamber);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:SetRearCamber(vehicle, rearCamber);\n    ```\n\n    \u003c/details\u003e\n* **SetFrontTrackWidth**\n    * int vehicle: the handle of the vehicle entity\n    * float frontTrackWidth: the value you want to assign as front track width\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n\n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].SetFrontTrackWidth(vehicle, frontTrackWidth);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:SetFrontTrackWidth(vehicle, frontTrackWidth);\n    ```\n\n    \u003c/details\u003e\n* **SetRearTrackWidth**\n    * int vehicle: the handle of the vehicle entity\n    * float rearTrackWidth: the value you want to assign as rear track width\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n\n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].SetRearTrackWidth(vehicle, rearTrackWidth);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:SetRearTrackWidth(vehicle, rearTrackWidth);\n    ```\n\n    \u003c/details\u003e\n* **SaveClientPreset**\n    * string presetName: the name you want to use for the saved preset\n    * int vehicle: the handle of the vehicle entity you want to save the preset from\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n\n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].SaveClientPreset(presetName, vehicle);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:SaveClientPreset(presetName, vehicle);\n    ```\n\n    \u003c/details\u003e\n* **LoadClientPreset**\n    * string presetName: the name of the preset you want to load\n    * int vehicle: the handle of the vehicle entity you want to load the preset on\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n\n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].LoadClientPreset(presetName, vehicle);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:LoadClientPreset(presetName, vehicle);\n    ```\n\n    \u003c/details\u003e\n* **DeleteClientPreset**\n    * string presetName: the name of the preset you want to delete\n    * bool result: returns `true` if the action successfully executed otherwise `false`\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    bool result = Exports[\"vstancer\"].DeleteClientPreset(presetName);\n    ```\n    Lua:\n    ```lua\n    local result = exports[\"vstancer\"]:DeleteClientPreset(presetName);\n    ```\n\n    \u003c/details\u003e\n* **GetClientPresetList**\n    * string[] presetList: the list of all the presets saved locally\n    \n    \u003cdetails\u003e\n    \u003csummary\u003eExample\u003c/summary\u003e\n\n    C#:\n    ```csharp\n    string[] presetList = Exports[\"vstancer\"].GetClientPresetList();\n    ```\n    Lua:\n    ```lua\n    local presetList = exports[\"vstancer\"]:GetClientPresetList();\n    ```\n\n    \u003c/details\u003e\n\n[Source](https://github.com/carmineos/fivem-vstancer)\n[Download](https://github.com/carmineos/fivem-vstancer/releases)\nI am open to any kind of feedback. Report suggestions and bugs you find.\n\n### Build\nOpen 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 built assembly of the script, the `config.json`, the `fxmanifest.lua`.\n\n### Requirements\nThe script uses [MenuAPI](https://github.com/TomGrobbe/MenuAPI) by Vespura to render the UI, ~~it uses FiveM built-in resource dependency, so the script will only work if MenuAPI resource is found and running~~ and comes already with a built assembly so that it's ready to use.\n\n### Installation\n1. Download the zip file from the release page\n2. Extract the content of the zip to the resources folder of your server (it should be a folder named `vstancer`)\n3. Enable the resource in your server config (`start vstancer`)\n\n### Todo\n* Add API for wheel mod data\n* Update local presets API to support wheel mod data\n* Add limits check for API\n* Add limits check for preset loading\n* Workaround wheel mod data being reset after any tuning component is changed\n* Clean duplicated code\n* API shouldn't allow to edit vehicles other players are driving\n\n### Roadmap\nOnce FiveM exposes extra-natives to edit `SubHandlingData` fields at runtime, the script will allow to edit XYZ rotation using the native handling fields of `CCarHandlingData` such as `fToeFront`, `fToeRear`, `fCamberFront`, `fCamberRear`, `fCastor`. (This will also improve a lot performances as such values won't need to be set each tick)\n\n### Credits\n* [VStancer by ikt](https://github.com/E66666666/GTAVStancer)\n* [FiveM by CitizenFX](https://github.com/citizenfx/fivem)\n* [MenuAPI by Vespura](https://github.com/TomGrobbe/MenuAPI)\n* [GTADrifting members](https://gtad.club/)\n* All the testers\n\n### Support\nIf you would like to support my work, you can through:\n* [Patreon](https://patreon.com/carmineos)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarmineos%2Ffivem-vstancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarmineos%2Ffivem-vstancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarmineos%2Ffivem-vstancer/lists"}