ESX Organization System | STAR Points, Upgrades, Vehicles & Logs
A powerful and immersive FiveM ESX-based organizational system built for roleplay servers with mafia/gang-like groups. It provides a dynamic way to manage upgrades, vehicles, storage, and competition between groups using STAR points.
Features

ox_inventory
)config.lua

Admin Commands (CONFIGURABLE IN CONFIG.LUA)

/addstars | Add STAR points to a society |
/removestars | Remove STAR points |
/checkstars | Check current STAR balance |
/resetplates | Reset organization plates |
[th]
Command
[/th][th]Description
[/th]All commands require admin permissions.
Organization Shop (Van System)

- Players can access the shop by walking to the organization van.
- Uses
ox_target
for interaction. - Includes animations when opening the menu.
Vehicle Handling Animations

- When spawning a vehicle: cinematic camera plays + visual effects + discord log.
- When returning vehicle: animation + notification with Discord log.
Exports
Export these in other scripts to interact with the system:
Code:
[I][COLOR=rgb(153, 153, 153)]-- Get upgrade level[/COLOR][/I]
exports[[COLOR=rgb(181, 189, 104)]'coii_organizacije'[/COLOR]]:getUpgradeLevel([COLOR=rgb(181, 189, 104)]'society_name'[/COLOR], [COLOR=rgb(181, 189, 104)]'vehicle_mods'[/COLOR])
[I][COLOR=rgb(153, 153, 153)]-- Remove STAR points[/COLOR][/I]
exports[[COLOR=rgb(181, 189, 104)]'coii_organizacije'[/COLOR]]:removePoints([COLOR=rgb(181, 189, 104)]'society_name'[/COLOR], 10)
[I][COLOR=rgb(153, 153, 153)]-- Add STAR points[/COLOR][/I]
exports[[COLOR=rgb(181, 189, 104)]'coii_organizacije'[/COLOR]]:addPoints([COLOR=rgb(181, 189, 104)]'society_name'[/COLOR], 20)
Discord Logs
This system logs the following events to your Discord webhook:
- Vehicle spawned
- Shop location (coords)
- Upgrade purchased
- Purchasing custom plate prefix
- STAR points added/removed
- Leaderboard refresh
sv_config.lua
:
Code:
Config.Webhook = [COLOR=rgb(181, 189, 104)]'https://discord.com/api/webhooks/...'[/COLOR]
Config.LeaderboardWebhook = [COLOR=rgb(181, 189, 104)]'https://discord.com/api/webhooks/...'[/COLOR]
Config.ShopWebhook = [COLOR=rgb(181, 189, 104)]'https://discord.com/api/webhooks/...'[/COLOR]
Leaderboard Logging
Leaderboard is updated automatically and logs the top organizations and their STAR point balance to a Discord webhook when refreshed.
- Triggered manually or on interval
- Displays: Top 5 organizations by points
- Uses
ox_lib
context menu for in-game viewing
Dependencies

es_extended
(1.9.4+)oxmysql
Installation

- Place the resource in your
resources
folder. - Add to
server.cfg
:
Code:ensure coii_organizacije
- Import the included
SQL
file into your database. - Configure everything in
config.lua
.