92 online 3 members  + Join RP Base  +
FreeScriptQBoxQBCoreESX

pl-voting

by pulsepk  ·  version 2026.06.04  ·  updated 5 days ago

No reviews yet

Downloads
0
Reviews
0
Size
28 KB
Code check
Clean
Licence
GPL-3.0
Released
Nov 2026

FiveM Voting Script | ESX, QBCore, QBox

pl-voting
FiveM Voting System
Watch on YouTube
## Support, Scripts & More ## Dependencies
  • ox_lib
  • pl_lib — PulseLib shared framework bridge (must be in the same resources folder)
  • oxmysql
Supported Frameworks
  • 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.
Installation Guide
  1. Extract pl-voting and pl_lib into your server resources folder (both must be present)
  2. Run database.sql against your database (HeidiSQL, phpMyAdmin, etc.)
  3. Open config.lua and configure:
  • Add admin licenses / permission groups
  • Set Config.LogWebhook to your Discord webhook URL if you want logs
  • Adjust Config.Candidates and Config.VotingBooths for your server
  1. Add both resources to server.cfg — pl_lib must start before pl-voting:
   ensure pl_lib
   ensure pl-voting
  1. Restart the server

Upgrading from v1.0.x?
The vote names in the election table 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 '"%"';
>
**Configuration (config.lua)**
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
Security Notes
  • 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:castVote performs 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.
🛒 More Scripts from Pulse Scripts
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