fnc_clearAllJammers.sqf 500 B

1234567891011121314151617
  1. if(isServer) then {
  2. diag_log "Clearing All Jammers for Server";
  3. private _jammers = missionNamespace getVariable ["rd501_jammers", []];
  4. {
  5. params["_jammer", "_radius", "_strength", "_jipId"];
  6. [_jipId] call CBA_fnc_removeGlobalEventJIP;
  7. } forEach _jammers;
  8. missionNamespace setVariable ["rd501_jammers",[], true];
  9. };
  10. if(hasInterface) then {
  11. diag_log "Clearing All Jammers for Client";
  12. missionNamespace setVariable ["rd501_jammers",[]];
  13. player setVariable ["rd501_jammers_pfh", -1];
  14. };
  15. true