Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This resource implements a voting system for FiveM servers, allowing players to vote for candidates (parties) via an in-game UI. It supports candidate management, voting permissions, vote tracking, and result display. The resource is designed to work with multiple frameworks (qbx_core, qb-core, es_extended, ox_core) and uses OxLib for UI and notifications.

Features

Voting UI

  • Displays a list of candidates with images, names, and party names.
  • Allows players to select a candidate and cast their vote.
  • UI can be opened/closed via in-game interactions.

Candidate Management

  • Add Candidate: Admins can add new candidates via an input dialog (Character ID, Party Name, Party Image).
  • Remove Candidate: Admins can remove candidates from the list.
  • Candidate Data: Stored and managed server-side.

Voting Logic

  • Vote Casting: Players can vote for a candidate. Each player can vote only once.
  • Vote Counting: Votes are incremented for the selected candidate.
  • Duplicate Prevention: Players who have already voted are notified and prevented from voting again.

Permissions & Controls

  • Voting Booths: Configurable locations where players can access the voting UI.
  • Control Panels: Admin panels for managing voting state, permissions, candidates, and clearing data.
  • Permission System: Restricts voting and admin actions based on player job/group.

Voting State Management

  • Commence/Conclude Voting: Admins can start or end the voting period.
  • Permission Setting: Admins can set or clear required permissions for voting.
  • Clear Data: Admins can wipe all voting and candidate data.

Results Display

  • View Results: Admins can view the current vote counts for all candidates.

Dependencies

Installation Steps

Preview

Watch the video

About

Voting System

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages