(STANDALONE) Save Vehicle Damages

A script by wesleyadryel

No reviews yet.
(STANDALONE) Save Vehicle Damages main image

Price

Unknown

Full Description

Wdev Vehicle State

Designed to provide a comprehensive framework for handling and preserving vehicle states in its server environment, this script caters to servers using QB-Core or easily adaptable to frameworks. While it doesn’t track bodily damage, it records and saves damages incurred to windows, ignition, body, fuel status, and doors.

Buy here:
https://wdev-solutions.tebex.io/package/6029558


Guide

  • Requires access to a MySQL/MariaDB database. Integration is automatically performed if the configuration is correct. The script has integration with oxmysql already configured, but you can adapt it
  • The script comes with a pre-configuration for the QB-Core framework. Simply specify the value “QB” in the Framework configuration field within the script.
  • It is essential to adapt the Config.getOwnerVehiclePlate function to retrieve the owner of the vehicle. This server-side function takes the entity ID and the plate as parameters. Incorrect configuration of this function will result in the script’s features not functioning correctly.

The script operates through exports. Integrate it into your scripts using the provided exports.
There are various server-side and client-side exports, but two main exports exist.

  1. Client-Side Export: applyDamagedVehicle
  • Parameters:
    • vehicle: NUMBER (Vehicle entity id)
  • Description:
    • Processes damage to the specified vehicle.
    • Use this export to apply the saved state of the vehicle.
    • Whenever a player enters the vehicle and the vehicle subsequently sustains damage, it will be updated in the database.

Export:
exports['wdev_vehicle_state']:applyDamagedVehicle(vehicle)

  1. Client-Side Export: updateVehicleState
  • Parameters:
    • vehicle: NUMBER (Vehicle entity id)
  • Description:
    • This export is used to save the vehicle data. It is not mandatory for regular use but can be useful if you want to force the save of the vehicle damage, such as when storing it in your garage system.

Export:
exports['wdev_vehicle_state']:updateVehicleState(vehicle)

Code is accessible No
Subscription-based No
Lines (approximately) 600+
Requirements Standalone
Support Yes

Config Merger
Have you tried Config Merger? Merge your configs easily