Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(es_extended/server/classes/vehicle): Add Vehicle Class #1440

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Kenshiin13
Copy link
Contributor

Overview

This is a draft implementation of a Vehicle Class for the ESX framework. The goal is to provide an object-oriented way to handle vehicle data, including attributes like netId, entity, plate, and owner, and actions such as setting properties, despawning, and updating vehicle data in the database.


Current Status

This implementation is still in its early stages. It has not been tested yet and is currently more of a proof of concept to explore the direction I want to take with this feature. As such, feedback would be greatly appreciated to help refine the approach and address any potential issues early on.


Key Features:

  • Vehicle Data: Stores essential vehicle information (e.g., netId, plate, props, owner).
  • Vehicle Methods: Includes methods to get and set vehicle properties, owner, and despawn the vehicle.
  • Database Interaction: Updates the database (owned_vehicles) when properties or owner information is changed.

Notable Code References

  • The structure and design of this class are inspired by the Vehicle class from the ox_core framework. You can check it out here.

TODO:

  • Testing: This draft has not yet been tested, and the methods likely need some refinement.
  • Error Handling: There might be areas to improve error handling and validation.

Any feedback on the design, performance, or implementation would be greatly appreciated!

@Mycroft-Studios Mycroft-Studios marked this pull request as ready for review November 13, 2024 16:26
@Kenshiin13 Kenshiin13 changed the title feat(server/classes/vehicle): Add Vehicle Class feat(es_extended/server/classes/vehicle): Add Vehicle Class Nov 17, 2024
@Kenshiin13 Kenshiin13 marked this pull request as draft November 24, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Be Tested
Development

Successfully merging this pull request may close these issues.

1 participant