> For the complete documentation index, see [llms.txt](https://jl-store.gitbook.io/jl-illegalphone/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jl-store.gitbook.io/jl-illegalphone/jl_breathalyzer/exports-and-events/exports.md).

# Exports

#### Lowering a players permille by identifier

```lua
exports['jl_breathalyzer']:lowerPermille(permille, identifier)
```

**Updating a players permille by identifier**

```lua
exports['jl_breathalyzer']:UpdatePermille(permille, identifier)
```

#### Getting a players permille by source

```lua
exports['jl_breathalyzer']:GetPermille(source)
```

## Examples:

#### Here is an example of lowering a players permille by using a export above

```lua
function ConsumedItemForDecrease()
    if consumed then
        local permille = 1 -- This will lower the permille
        local identifier = QBCore.Functions.GetIdentifier(source, 'license') -- This will get the players license from source
        exports['jl_breathalyzer']:lowerPermille(permille, identifier)
    end
end
```

#### Here is an example of updating a players permille by using a export above

<pre class="language-lua"><code class="lang-lua"><strong>QBCore.Functions.CreateUseableItem("vodka", function(source, item)
</strong>    local Player = QBCore.Functions.GetPlayer(source)
    local permille = 0.2
    local identifier = QBCore.Functions.GetIdentifier(source, 'license')

	if Player.Functions.GetItemBySlot(item.slot) ~= nil then
        exports['jl_breathalyzer']:UpdatePermille(permille, identifier)
    end
end)
</code></pre>

#### Here is an example of getting a players permille by using a export above

```lua
RegisterCommand('getPlayerPermille', function()
    local src = source
    local permille = exports['jl_breathalyzer']:GetPermille(src)
    print(permille)
end)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://jl-store.gitbook.io/jl-illegalphone/jl_breathalyzer/exports-and-events/exports.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.
