Skip to content

rxbyydev/dafem_ticketsystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DAFEM Ticket System

A complete support ticket system for FiveM QBX Framework with multi-language support.

๐Ÿ“‹ Information

โœจ Features

  • โœ… Fully QBX-based
  • โœ… Modern responsive UI design
  • โœ… Multi-language support (EN, DE, FR, ES, PT, CZ)
  • โœ… Categories and priorities
  • โœ… Staff panel for administrators
  • โœ… Real-time notifications with sound
  • โœ… Auto-refresh (polling every 5 seconds)
  • โœ… Overhead text when player is in ticket system
  • โœ… Ticket history and activity logs
  • โœ… Multiple open tickets per player
  • โœ… Claimed ticket system (exclusive handling)
  • โœ… User information panel for staff
  • โœ… MySQL database integration
  • โœ… /support quick command
  • โœ… Fully configurable

๐Ÿ“ฆ Dependencies

๐Ÿš€ Installation

  1. Download dafem_ticketsystem to your resources folder
  2. Import qbx_ticketsystem.sql into your database
  3. Add ensure dafem_ticketsystem to your server.cfg
  4. (Optional) Place your notify.mp3 file in dafem_ticketsystem/html/
  5. Restart your server

โš™๏ธ Configuration

Edit shared/config.lua to customize the system:

Language

Config.Locale = 'en' -- Available: en, de, fr, es, pt, cz

Categories

Config.TicketCategories = {
    { id = 1, name = 'General Question', icon = 'question-circle', color = '#3b82f6' },
    { id = 2, name = 'Technical Issue', icon = 'wrench', color = '#ef4444' },
    -- Add your own categories
}

Priorities

Config.TicketPriorities = {
    { id = 1, name = 'Low', level = 1, color = '#10b981' },
    { id = 2, name = 'Normal', level = 2, color = '#3b82f6' },
    -- Add your own priorities
}

Permissions

Config.StaffPermission = 'admin' -- Permission for staff panel

Limits

Config.MaxOpenTicketsPerPlayer = 3 -- Max open tickets per player
Config.TicketCooldown = 300 -- Cooldown in seconds (5 minutes)

Notifications

Config.NotifySound = true -- Enable notification sound
Config.NotifySoundVolume = 0.5 -- Volume (0.0 to 1.0)

Overhead Text

Config.ShowOverheadText = true -- Show text above player
Config.OverheadText = 'In Ticket System' -- Text to display
Config.OverheadTextScale = 0.35 -- Text size
Config.OverheadTextFont = 4 -- Font type
Config.OverheadTextColor = { r = 164, g = 208, b = 55, a = 215 } -- RGBA color

Auto-Refresh

Config.AutoRefreshInterval = 5000 -- Interval in milliseconds (5 seconds)

Commands

Config.Commands = {
    OpenTickets = 'tickets', -- Open user panel
    OpenStaffPanel = 'ticketsadmin', -- Open staff panel
    QuickSupport = 'support' -- Quick ticket creation
}

UI Theme

Config.UITheme = {
    PrimaryColor = '#a4d037', -- Main accent color
    BackgroundDark = '#0a0a0a', -- Dark background
    BackgroundLight = '#1a1a1a', -- Light background
    TextPrimary = '#e0e0e0', -- Primary text color
    TextSecondary = '#9ca3af', -- Secondary text color
    BorderColor = 'rgba(164, 208, 55, 0.2)' -- Border color
}

๐ŸŽฎ Commands

  • /tickets - Open ticket system (user view)
  • /ticketsadmin - Open staff panel (requires permission)
  • /support <message> - Create quick support ticket

๐ŸŽจ Features in Detail

User View (/tickets)

  • Create new tickets with categories
  • View your own tickets only
  • Reply to your tickets
  • Close your tickets
  • Filter by status
  • Toggle closed tickets visibility

Staff View (/ticketsadmin)

  • View all tickets from all users
  • Claim tickets for exclusive handling
  • Unclaim tickets to release them
  • Change ticket priorities
  • Close any ticket
  • View user information (online status, job, money, etc.)
  • Access user data (vehicles, properties, inventory, licenses)

Claimed Ticket System

  • When a staff member claims a ticket, only they can reply
  • Ticket creator can always reply (even if claimed)
  • Other staff members see a locked message
  • Staff can unclaim tickets to release them

Notification Sound

  • Plays when new tickets arrive (staff view)
  • Plays when new messages arrive in open ticket
  • Configurable volume
  • Place notify.mp3 in html/ folder

Auto-Refresh

  • Automatically checks for new content every 5 seconds
  • Smart scroll management (maintains position or auto-scrolls)
  • Only refreshes active view (list OR detail)
  • Configurable interval

๐Ÿ—„๏ธ Database

The system uses 4 main tables:

  • tickets - Main ticket storage
  • ticket_messages - All messages
  • ticket_categories - Categories with icons and colors
  • ticket_priorities - Priority levels
  • ticket_activity_log - Audit trail

๐ŸŒ Supported Languages

  • ๐Ÿ‡ฌ๐Ÿ‡ง English (en)
  • ๐Ÿ‡ฉ๐Ÿ‡ช German (de)
  • ๐Ÿ‡ซ๐Ÿ‡ท French (fr)
  • ๐Ÿ‡ช๐Ÿ‡ธ Spanish (es)
  • ๐Ÿ‡ต๐Ÿ‡น Portuguese (pt)
  • ๐Ÿ‡จ๐Ÿ‡ฟ Czech (cz)

To add a new language, create a file in locales/ folder following the existing structure.

๐Ÿ› Troubleshooting

Tickets not showing?

  • Check database connection
  • Verify tables are created
  • Check server console for errors

Sound not playing?

  • Ensure notify.mp3 is in html/ folder
  • Check file name is exactly notify.mp3
  • Restart the resource

Permission issues?

  • Verify Config.StaffPermission matches your permission system
  • Check QBX Core permissions

UI not opening?

  • Check for JavaScript errors in F8 console
  • Verify all dependencies are installed
  • Restart the resource

๐Ÿ“ License

See LICENSE file for details.

๐Ÿ’ฌ Support

๐Ÿ™ Credits

Created by _dafemboy for the FiveM community.


Enjoy the ticket system! If you like it, consider leaving a star on GitHub! โญ

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors