# Weight Reduction

Doing a weight reduction, involves creating a command or script to execute the export to set the vehicle weight.\
\
It is important to remember that C.H.A.S.E.R, will not save the vehicle weight, and a independent saving/loading system should be made.\
\
Luckly, we already provide a functional demo for that, [and it can be accessed here](https://github.com/LegacyDMC/chaserdemo/tree/main/chaser_db_tuner)\
\
In order to create a command to set weight in your car, create a lua resource and paste the following code:

```lua
local chaser = exports['legacydmc_chaser'] -- the export HAS to be "legacydmc_chaser"

RegisterCommand("weightreduction", function(source, args, rawCommand)
    if #args < 1 then
        print("Please insert an weight..")
        return
    end
    local weightinkg = args[1]
    if chaser:chaser_getloadstatus() then
        chaser:chaser_setweight(weightinkg)
        --TriggerServerEvent('chaser:savemetadata',NetworkGetNetworkIdFromEntity(vehicle),'weight',weightinkg) -- simulating the save on the front end
        Citizen.Wait(50)
        chaser:chaser_refreshengine()
    end
end, false)

```


---

# 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://legacydmc.gitbook.io/chaser/fundamentals/weight-reduction.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.
