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 membersEvents Triggered
| Event | Target | Description |
|---|---|---|
wtf_group:client:groupSync | Group members | Full group state |
wtf_group:client:dashboardSync | Group members | Dashboard data |
wtf_group:client:repSync | Group members | Reputation update |
wtf_group:client:gpsSync | Group members | GPS/blip data |