> 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.
```
