> For the complete documentation index, see [llms.txt](https://legacydmc.gitbook.io/chaser/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacydmc.gitbook.io/chaser/networking/statebags.md).

# Statebags

As mentioned previously, chaser is synced and uses statebags to do so, chaser statebags are as follow:

## currentgear <a href="#docs-internal-guid-7d394f02-7fff-f7c1-3cf6-bc1382e3ca30" id="docs-internal-guid-7d394f02-7fff-f7c1-3cf6-bc1382e3ca30"></a>

This Statebag is responsible for keeping the data necessary for transmission syncronization, alongside the current vehicle gear, and you can access it to show the current gear on your speedometer

```lua
gear = Entity(entity).state.currentgear[1]
```

## currentengine <a href="#docs-internal-guid-7d394f02-7fff-f7c1-3cf6-bc1382e3ca30" id="docs-internal-guid-7d394f02-7fff-f7c1-3cf6-bc1382e3ca30"></a>

This Statebag is responsible for keeping the data necessary for engine syncronization, alongside the current audiohash, and you can access it to show the current gear on your speedometer

```lua
currentengine = Entity(entity).state.currentengine[1]
currentaudiohash = Entity(entity).state.currentengine[2]
```

## dumpvalvefired <a href="#docs-internal-guid-7d394f02-7fff-f7c1-3cf6-bc1382e3ca30" id="docs-internal-guid-7d394f02-7fff-f7c1-3cf6-bc1382e3ca30"></a>

A State bag which can be used to playback a dumpvalve sound when chaser turbo system dumpvalve is fired using statebagchangehandler example:

```lua
AddStateBagChangeHandler("dumpvalvefired", nil, function(bagName, key, value)
    local entity = GetEntityFromStateBagName(bagName)


    if DoesEntityExist(GetPedInVehicleSeat(entity, -1)) then
       
    local dumpvalve = value
   
    if entity ~= 0 and GetPedInVehicleSeat(vehicle, -1) ~= player then
        if dumpvalve == true then -- if dumpvalve was fired
            PlayTurboSound("dumpvalve_01") -- here you call your function to play your dumpvalve sound
            Entity(entity).state:set('dumpvalvefired',false,true) -- set the state to false again, for the                   
                                                                     next release.
        end
    end


end)
```
