An advanced starter pack system for ESX Legacy FiveM servers that provides new players with customizable welcome rewards including cash, items, weapons, and vehicles.
- Multiple Starter Pack Options - Players can choose between different starter pack types (Civilian, Criminal, etc.)
- Customizable Rewards - Configure cash, items, weapons, and vehicles per pack
- One-Claim System - Prevents abuse by allowing each player to claim only once
- NPC Interaction - Easy-to-use NPC for players to interact with
- Discord Logging - Automatic Discord webhook notifications when packs are claimed
- ox_target Support - Optional integration with ox_target for better UX
- Blip System - Mini-map marker for easy NPC location
- MySQL Support - Uses oxmysql for efficient database operations
- Player Tracking - Database tracking of claimed packs per identifier
This script requires the following resources to be installed on your FiveM server:
- es_extended - ESX Legacy Framework
- ox_lib - Utility library for FiveM
- ox_target - Advanced targeting system
- oxmysql - MySQL driver
- FiveM Build: cerulean or higher
- Game: GTA5
- Framework: ESX Legacy
- Download or clone this repository
- Extract the folder to your server's
resourcesdirectory - Rename the folder to
[scripts]if needed (or use any naming convention)
Run the following SQL query on your server database:
CREATE TABLE IF NOT EXISTS `starterpacks` (
`identifier` varchar(60) NOT NULL,
`claimed` tinyint(1) NOT NULL DEFAULT 1,
`claimed_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;- Open
config.lua - Configure your settings (NPC location, starter packs, etc.)
- Add your Discord webhook URL (optional)
Add the following to your server.cfg:
ensure es_extended
ensure ox_lib
ensure ox_target
ensure oxmysql
ensure [scripts]Config = {}
-- Use ox_target for interactions (true) or DrawText3D + E key (false)
Config.UseTarget = false
-- Discord webhook for logging claims (set empty string to disable)
Config.DiscordWebhook = "YOUR_WEBHOOK_URL_HERE"Config.Blip = {
Enabled = true,
Sprite = 587,
Color = 3,
Scale = 0.8,
Name = "Starter Pack"
}Config.NPC = {
Model = "a_m_y_business_03",
Coords = vector4(-1039.1547, -2732.2444, 20.1692, 237.3990) -- Airport location
}Each starter pack can include:
Config.Packs = {
['basic'] = {
label = 'Civilian Starter Pack',
description = 'A simple start for an honest worker.',
icon = 'briefcase',
rewards = {
money = {
enabled = true,
cash = 5000,
bank = 10000
},
items = {
enabled = true,
list = {
{name = 'phone', count = 1},
{name = 'water', count = 5},
{name = 'bread', count = 5}
}
},
weapons = {
enabled = false,
list = {
{name = 'WEAPON_BAT', ammo = 1}
}
},
vehicle = {
enabled = true,
model = 'blista',
spawnPoint = vector4(-1032.6547, -2728.7517, 19.6406, 56.3793)
}
}
}
}StarterPack/
โโโ README.md # This file
โโโ fxmanifest.lua # FiveM manifest
โโโ config.lua # Configuration file
โโโ starterpacks.sql # Database schema
โโโ client/
โ โโโ main.lua # Client-side code
โโโ server/
โ โโโ main.lua # Server-side code
โโโ public/
โโโ lib.js # Utility library
- Locate the Starter Pack NPC at the airport on your map (blip appears)
- Approach the NPC
- If using
ox_target: Click the interaction option - If using DrawText3D: Press 'E' when prompted
- Select your desired starter pack from the menu
- Receive your rewards instantly
Edit config.lua and add a new pack under Config.Packs:
['engineer'] = {
label = 'Engineer Starter Pack',
description = 'For mechanics and engineers.',
icon = 'wrench',
rewards = {
money = { enabled = true, cash = 3000, bank = 7000 },
items = { enabled = true, list = {{name = 'toolbox', count = 1}} },
weapons = { enabled = false, list = {} },
vehicle = { enabled = true, model = 'dilettante', spawnPoint = vector4(...) }
}
}Run this SQL query to allow a player to claim again:
DELETE FROM starterpacks WHERE identifier = 'PLAYER_IDENTIFIER';SELECT * FROM starterpacks;Checks if the current player has already claimed a starter pack.
Returns: boolean - true if already claimed, false otherwise
local hasClaimed = lib.callback.await('starterpack:checkClaimStatus')Attempts to claim a specific starter pack for the player.
Parameters:
packId(string): The ID of the pack to claim
Returns: boolean, string - Success status and message
local success, message = lib.callback.await('starterpack:claimPack', false, 'basic')| Issue | Solution |
|---|---|
| NPC not appearing | Check NPC coordinates in config.lua; ensure model exists |
| Can't interact with NPC | Verify ox_target is running if UseTarget = true |
| Discord webhook not working | Check webhook URL format and permissions |
| Database errors | Ensure starterpacks table is created; check oxmysql is running |
| Players can claim multiple times | Check starterpacks table for duplicate entries |
- One-Claim Protection: Players can only claim once per identifier
- Server-Side Validation: All claims processed on server-side
- Database Tracking: Complete audit trail of who claimed what and when
- Discord Logging: Optional webhook logging for admin oversight
| Column | Type | Description |
|---|---|---|
identifier |
varchar(60) | Player's unique identifier (Primary Key) |
claimed |
tinyint(1) | Claim status (1 = claimed) |
claimed_at |
timestamp | When the pack was claimed |
['mechanic'] = {
label = 'Mechanic Starter Pack',
description = 'Tools and cash for mechanics.',
icon = 'hammer',
rewards = {
money = { enabled = true, cash = 2000, bank = 3000 },
items = { enabled = true, list = {{name = 'advancedtoolbox', count = 1}} },
weapons = { enabled = false, list = {} },
vehicle = { enabled = true, model = 'rumpo', spawnPoint = vector4(...) }
}
}Config.DiscordWebhook = "" -- Empty string disables loggingConfig.UseTarget = falseContributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Aiben - Created and maintained with โค๏ธ
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check the Troubleshooting section
- Consult the Configuration guide
- GUI improvements with more customization options
- Skill points system based on starter pack
- Time-limited special packs
- Player statistics dashboard
- Integration with job systems
- Multilingual support
If you find this script useful, please consider giving it a star! It helps others discover this resource.
Enjoy your Starter Pack System! ๐
