> For the complete documentation index, see [llms.txt](https://bros-development.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bros-development.gitbook.io/documentation/scripts/brosdev-bounty-system/common-issues-and-troubleshooting.md).

# ❓ Common Issues & Troubleshooting

This section covers the most common problems faced when installing or using **BrosDev-BountySystem**, along with clear fixes.

***

## 🚫 1. Tablet Does Not Open

#### ❌ Problem:

Using the `bounty_tablet` item does nothing.

#### 🔍 Causes:

* Item export not added correctly
* Inventory type mismatch
* Resource not started properly

#### ✅ Fix:

Make sure your item is correctly set:

```lua
client = {
    export = 'BrosDev-BountySystem.useTablet'
}
```

Also confirm:

* Resource is started AFTER inventory
* `ox_lib` is started before the script
* Item exists in your inventory database

***

## 🖥️ 2. Tablet UI Opens Blank Screen

#### ❌ Problem:

Tablet opens but shows nothing or black screen.

#### 🔍 Causes:

* NUI cache issue
* Missing HTML files
* Broken build load

#### ✅ Fix:

Clear FiveM cache:

```
%localappdata%\FiveM\FiveM.app\data\nui-storage
%localappdata%\FiveM\FiveM.app\data\cache
```

Then restart the server.

Also ensure:

* `html/` folder exists
* `fxmanifest.lua` includes NUI files

***

## 💾 3. SQL Not Working / Tables Missing

#### ❌ Problem:

Bounties or wallet system not saving data.

#### 🔍 Causes:

* SQL file not imported
* Wrong database selected
* MySQL connection not active

#### ✅ Fix:

Make sure:

* `oxmysql` is running
* You imported:

```
install/install.sql
```

Check console for:

```
oxmysql connected successfully
```

***

## 💰 4. Wallet Balance Not Updating

#### ❌ Problem:

Deposits or payouts not reflecting in wallet.

#### 🔍 Causes:

* Wrong CID system
* Framework mismatch
* Database sync delay

#### ✅ Fix:

* Ensure framework is set correctly:

```lua
Config.Framework = 'auto'
```

* Make sure CID is correctly fetched (not Steam name / license mismatch)
* Restart resource after config changes

***

## 🎯 5. Bounties Not Showing

#### ❌ Problem:

No bounties appear in tablet UI.

#### 🔍 Causes:

* SQL not running
* Status not set to `active`
* Wrong database table name

#### ✅ Fix:

Check database:

```sql
SELECT * FROM brosdev_bounties;
```

Ensure:

* `status = active`
* `expires > current timestamp`

***

## 🔥 6. Kill Not Registering (Bounty Not Completing)

#### ❌ Problem:

Player kills target but bounty doesn’t complete.

#### 🔍 Causes:

* Weapon validation failure
* Distance check failing
* Event not firing

#### ✅ Fix:

Make sure:

* You are not using unsupported kill methods (like scripts overriding death)
* Baseevents is enabled in your server
* No custom anti-cheat blocking events

***

## 🧍 7. Player Cannot Accept Bounty / Hunter Not Added

#### ❌ Problem:

Clicking “Accept Hunt” does nothing.

#### 🔍 Causes:

* Database insert failing
* Duplicate entry blocked
* CID mismatch

#### ✅ Fix:

Check SQL constraint:

```sql
UNIQUE KEY `unique_hunter_bounty`
```

This prevents duplicate joins — not an error.

***

## 🧑‍🤝‍🧑 8. Party System Not Working

#### ❌ Problem:

Party invite or join fails.

#### 🔍 Causes:

* Player not online
* Wrong CID format
* Event blocked by UI

#### ✅ Fix:

* Ensure both players are online
* Make sure tablet UI is open for invites
* Restart resource after install

***

## 📡 9. Discord Webhooks Not Sending

#### ❌ Problem:

No logs in Discord channel.

#### 🔍 Causes:

* Invalid webhook URL
* Placeholder URL not replaced
* Firewall blocking requests

#### ✅ Fix:

Make sure config has real URLs:

```lua
Config.Webhooks.newBounty = "https://discord.com/api/webhooks/..."
```

Test webhook manually in browser or Postman.

***

## 📍 10. Tracking Not Showing Player Location

#### ❌ Problem:

Tracking purchase works but no location appears.

#### 🔍 Causes:

* Zone tracker not running
* Last seen data missing
* Player in interior / no zone update

#### ✅ Fix:

* Ensure `lastseen.lua` is running
* Wait at least 60 seconds for zone update cycle
* Player must move at least once after spawn

***

## ⚠️ 11. Script Not Starting

#### ❌ Problem:

Resource fails to start.

#### 🔍 Causes:

* Missing dependency
* Syntax error in config
* Wrong folder name

#### ✅ Fix:

Check server console:

```
ensure oxmysql
ensure ox_lib
ensure BrosDev-BountySystem
```

Make sure:

* Folder name EXACTLY matches resource name
* No missing dependencies

***

## 🧠 12. General Best Practice Fix

If anything breaks and you're unsure:

✔ Restart resource\
✔ Clear cache\
✔ Check F8 console\
✔ Verify SQL is imported\
✔ Ensure dependencies are started first
