fnc_jammersUpdateLocal.sqf 644 B

12345678910111213141516171819
  1. params["_jammers"];
  2. // Client
  3. localNamespace setVariable ["rd501_jammers", _jammers];
  4. diag_log format["[RD501 Jammers] 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 = [{
  10. _this call rd501_fnc_jammersClientPFH;
  11. }, 2, [player]] call CBA_fnc_addPerFrameHandler;
  12. player setVariable ["rd501_jammers_pfh", _handle];
  13. diag_log format["[RD501 Jammers] Started client PFH with handle '%1'", _handle];
  14. _handle
  15. };
  16. };