# YZN Daily Rewards System
A modern, robust daily rewards system for FiveM servers using **QB-Core** and **QS-Inventory**. Supports streaks, missed days, admin testing tools, and a beautiful UI.
---
## Features
- 30-day monthly reward cycle
- Tracks claimed and missed days
- Streak system
- Admin commands for testing (skip, reset timer)
- Fully synced progress bar and UI
- Missed days are visually marked
- Automatic monthly reset
---
## Requirements
- [qb-core](https://github.com/qbcore-framework/qb-core)
- [qs-inventory](https://github.com/qs-community/qs-inventory)
**Note:** This script is only supported with QB-Core and QS-Inventory.
---
## Installation
1. **Clone or download this resource into your `resources` folder.**
2. **Run the SQL below in your database:**
```sql
CREATE TABLE IF NOT EXISTS `daily_rewards` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`identifier` VARCHAR(50) NOT NULL,
`claimed_days` TEXT DEFAULT '[]',
`missed_days` TEXT DEFAULT '[]',
`last_claim` INT NOT NULL,
`last_update` INT NOT NULL,
`admin_can_claim` TINYINT(1) DEFAULT 0,
UNIQUE KEY `identifier` (`identifier`)
);
```
3. **Add the resource to your `server.cfg`:**
```
ensure yzn-daily-rewards
```
4. **Configure your rewards in `config.lua` if desired.**
---
## Usage
- **Open the daily rewards UI:**
- `/dailyrewards` (or your configured command)
- **Admin commands:**
- `/skipreward` — Skip the current day (marks as missed, next day available to claim instantly for admins)
- `/resetrewardtimer` — Instantly reset your claim timer (for testing, does not affect streak)
- **Claim your reward:**
- Press the claim button in the UI when available
---
## Support
- Only supports **qb-core** and **qs-inventory**.
- For issues, suggestions, or contributions, open an issue or PR on the GitHub repo or post on the CFX.re forums release thread.
---
## Discord
- https://discord.gg/pCmQeQsh65
Enjoy your new daily rewards system!