Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pulsepk/pl-voting

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FiveM Voting System

Watch on YouTube

ZAP-Hosting Gameserver and Webhosting

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
  4. Add both resources to server.cfgpl_lib must start before pl-voting:
    ensure pl_lib
    ensure pl-voting
    
  5. 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

About

FiveM Voting Script | ESX, QBCore, QBox

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.