# Custom Framework

Using a custom framework with JG Vehicle Mileage is fairly straightforward. All your framework needs to have is some sort of owned vehicles database table, and that table needs to have a `plate` column in it. Then all you need to do is:

1. Go to `jg-vehiclemileage/main.lua`
2. Add another conditional for your framework, and point to the name of your vehicles table
3. In `jg-vehiclemileage/config.lua`, set `Config.Framework = [your framework name]`

Example:

```lua
if Config.Framework == "QBCore" then
  Framework.VehiclesTable = "player_vehicles"
elseif Config.Framework == "ESX" then
  Framework.VehiclesTable = "owned_vehicles"
elseif Config.Framework == "MyFrameworkName" then
  Framework.VehiclesTable = "vehicles_table_name"
else
  error("You haven't set a valid framework. Valid options can be found in main.lua!")
end
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jgscripts.com/vehicle-mileage/custom-framework.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
