Skip to content

Server Sync

File: server/sync.lua

Server→client state broadcasting.

Responsibilities

  • Broadcast group state to all group members
  • Send individual player state updates
  • Handle full sync requests

Key Functions

lua
SyncGroupState(groupId)
-- Broadcasts full group state to all members

SyncPlayerState(src, groupId)
-- Sends full state to single player

SyncDashboard(groupId)
-- Broadcasts dashboard data to all members

Events Triggered

EventTargetDescription
wtf_group:client:groupSyncGroup membersFull group state
wtf_group:client:dashboardSyncGroup membersDashboard data
wtf_group:client:repSyncGroup membersReputation update
wtf_group:client:gpsSyncGroup membersGPS/blip data

AIFAZI — FiveM Resources