IsDuplicityVersion() is the canonical server/client switch (true = server); GetGameTimer() is client-only
Context
Scripts that load on both sides (shared files) need a reliable way to know whether they're running on the server or the client. Agents reach for brittle checks (presence of a client-only native, source, resource names).
The fix
IsDuplicityVersion() is the runtime side-detector: returns true on the server, false on the client, and is safe to call from shared context. jo_libs bases its entire context flag on it:
local context = IsDuplicityVersion() and "server" or "client" -- init.lua:20
Corollary — timebase
GetGameTimer() does not exist server-side. For elapsed-time logic that must run on both sides, branch on IsDuplicityVersion():
local now = IsDuplicityVersion() and (os.time() * 1000) or GetGameTimer()
Verified
init.lua:20, server-only logging gated at framework-bridge/shared.lua:185; the timebase split is at waiter/shared.lua:4-10. Native is documented as "whether this is the CitizenFX server" but with no note that it's the preferred side-check or shared-safe, and no link to the GetGameTimer client-only consequence.
Tags: isduplicityversion, server-client, getgametimer, shared, timing, side-detection
Category: natives
Source: jo_libs-fleet
Created: 2026-05-31T09:39:31.298Z