- QBox (
qbx_core) - QBCore (
qb-core) - ESX (
es_extended)
Framework, TextUI, and Notification system are all auto-detected by pl_lib — no manual Config.Notify / Config.DrawText settings required.
- Extract
pl-votingandpl_libinto your server resources folder (both must be present) - Run
database.sqlagainst your database (HeidiSQL, phpMyAdmin, etc.) - Open
config.luaand configure:- Add admin licenses / permission groups
- Set
Config.LogWebhookto your Discord webhook URL if you want logs - Adjust
Config.CandidatesandConfig.VotingBoothsfor your server
- Add both resources to
server.cfg—pl_libmust start beforepl-voting:ensure pl_lib ensure pl-voting - Restart the server
Upgrading from v1.0.x?
The vote names in theelectiontable were previously stored as JSON-encoded strings (e.g."John Doe"with surrounding quotes). Run the following SQL to clean up existing records before starting the new version:UPDATE election SET name = JSON_UNQUOTE(name) WHERE name LIKE '"%"'; UPDATE election SET party = JSON_UNQUOTE(party) WHERE party LIKE '"%"';
| Key | Default | Description |
|---|---|---|
Config.Permissions |
{"god","admin","mod"} |
ESX groups allowed to use the admin menu |
Config.AdminLicense |
{} |
QB/QBox license identifiers with admin access |
Config.MenuCommand |
'election' |
Command to open the admin panel |
Config.Log |
true |
Enable/disable Discord logging |
Config.LogWebhook |
"" |
Discord webhook URL |
Config.LogType |
'discord' |
'discord' | 'fivemanage' | 'fivemerr' |
Config.Candidates |
see file | List of { name, party } objects |
Config.VotingBooths |
see file | vector3 positions (configured for Gabz Townhall) |
Config.ServerAnnouncement |
true |
Broadcast a chat message on election start/end |
Config.Debugpoly |
false |
Show voting booth zone boxes |
- All admin actions (
startElection,endElection,deleteRecord,resetVotes,resetSomeonesVote) are validated server-side — a player cannot bypass the permission check by triggering events from the console. voting:server:castVoteperforms a server-side election-state check and duplicate-vote check before recording any vote.- The UI no longer loads scripts from external CDNs (axios and FontAwesome removed); all JavaScript runs locally.
| Script | Link |
|---|---|
| 🍔 BurgerShot | View |
| 🐱 UwU Cat Cafe | View |
| 🍕 Pizza This | View |
| ☕ Bean Machine | View |
| 🐟 KOI | View |
| 🍽️ Diner | View |
| 🌮 Taco Farmer | View |
| 🐚 Pearls | View |
| 🍔 Horny Burgers + UpnAtom | View |
| 🍩 Rusty Browns | View |
| 🍬 Bubble Gum Cafe | View |
| 💊 Drug Selling | View |
| 🛑 Wheel Clamper | View |