arma2 and arma3 has nice feature to check for locality.
Detect dedicated server or headless client:
// If dedicated server or headless client, nothing to do here if (!hasInterface) exitWith {};