> For the complete documentation index, see [llms.txt](https://docs.picklemods.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.picklemods.com/paid-resources/bail-and-bounty/exports.md).

# Exports

## Server-Side:

```lua
exports.pickle_bailbounty:AddBailToRegistry(bail)
--Adds bail entry into registry.
bail: {
        source = GetSourceFromIdentifier(bail.identifier),
        identifier = bail.identifier, -- Character Identifier
        name = bail.name, -- Character Name
        image = bail.image or "NO_IMAGE", -- Image
        issuer = bail.issuer, -- Issuer identifier
        reward = bail.reward, -- Bail amount
        description = bail.description, -- Description of bail recipient
        startdate = bail.startdate, -- Recommended: os.time()
        completiondate = bail.completiondate, -- Recommended: os.time() + (86400 * days)
        nextcompliance = bail.nextcompliance, -- Recommended: os.time() + 86400
        lastcompliance = bail.lastcompliance, -- Recomended: os.time()
        status = bail.status or "compliant",
        sentence = bail.sentence or 0,
}
```

```lua
exports.pickle_bailbounty:RemoveBailFromRegistry(identifier)
-- Removes identifier's bail entry from the registry.
```

```lua
exports.pickle_bailbounty:GetBailStatus(identifier)
-- Gets identifier's bail entry from the registry.
```

```lua
exports.pickle_bailbounty:AddBountyToRegistry(bounty)
-- Removes identifier's bail entry from the registry.
bounty: {
        target = bounty.target, -- Character Identifier
        targetname = bounty.targetname, -- Character Name
        image = bounty.image or "NO_IMAGE", -- Image
        issuer = bounty.issuer, -- Issuer Identifier
        reward = bounty.reward, -- Bounty reward
        description = bounty.description, -- Description of target
        risk = bounty.risk, -- Value must be 1-3. 1 is low, 2 is medium, 3 is high
        sentence = bounty.sentence or 0, -- This will auto-sentence the captured bounty to prison if above 0.
}
```

<pre class="language-lua"><code class="lang-lua"><strong>exports.pickle_bailbounty:RemoveBountyFromRegistry(identifier)
</strong>-- Removes identifier's bounty entry from the registry.
</code></pre>

<pre class="language-lua"><code class="lang-lua"><strong>exports.pickle_bailbounty:GenerateNPCBounty()
</strong>-- Adds a auto-generated NPC bounty to the registry.
</code></pre>

<pre class="language-lua"><code class="lang-lua"><strong>exports.pickle_bailbounty:GetPlayerCurrentBounty(source)
</strong>-- Returns what bounty a player is actively chasing.
</code></pre>

<pre class="language-lua"><code class="lang-lua"><strong>exports.pickle_bailbounty:CancelBounty(identifier, removeEntry)
</strong>-- Cancels the identifier's bounty if in-progress.
identifier: characterIdentifier,
removeEntry: bool (default: false)
</code></pre>

```lua
exports.pickle_bailbounty:IsPlayerBountyHunter(source)
-- Returns if the player is a on-duty bounty hunter.
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.picklemods.com/paid-resources/bail-and-bounty/exports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
