fnc_jammersUpdateLocal.sqf 643 B

1234567891011121314151617
  1. params["_jammers"];
  2. // Client
  3. localNamespace setVariable ["rd501_jammers", _jammers];
  4. diag_log format["[RD501 Jammers][Local Update] Updated jammers to '%1'", _jammers];
  5. // If we're a client with an interface, and there is no pfh running already, start it.
  6. if(hasInterface) then {
  7. private _pfhHandle = player getVariable ["rd501_jammers_pfh", -1];
  8. if(_pfhHandle isEqualTo -1) then {
  9. private _handle = [rd501_fnc_jammersClientPFH, 2, []] call CBA_fnc_addPerFrameHandler;
  10. player setVariable ["rd501_jammers_pfh", _handle];
  11. diag_log format["[RD501 Jammers][Local Update] Started client PFH with handle '%1'", _handle];
  12. _handle
  13. };
  14. };