Skip to content

Client Main

File: client/main.lua

Client entry point. Handles group command registration, keybind setup, and initial sync.

Responsibilities

  • Register /group command
  • Set up keybind (default: none, configured via Config.Tablet.keybind)
  • Trigger initial state sync on resource start
  • Handle player loaded event

Key Functions

FunctionDescription
OpenGroupUI()Opens the group NUI overlay
CloseGroupUI()Closes the group NUI overlay

Events Listened

EventDescription
QBCore:Client:OnPlayerLoadedPlayer loaded (QBCore)
QBX:Client:OnPlayerLoadedPlayer loaded (QBX)
esx:playerLoadedPlayer loaded (ESX)
wtf_group:client:openUIServer requests UI open
wtf_group:client:closeUIServer requests UI close

Events Triggered

EventTargetDescription
wtf_group:server:playerLoadedServerPlayer ready for sync
wtf_group:server:syncServerRequest full state sync

AIFAZI — FiveM Resources