Guest User

Untitled

a guest
Jun 11th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_requestMedic.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. N/A
  8. */
  9. private "_medicsOnline";
  10. _medicsOnline = {!(_x isEqualTo player) && {side _x isEqualTo independent} && {alive _x}} count playableUnits > 0; //Check if medics (indep) are in the room.
  11.  
  12. life_corpse setVariable ["Revive",false,true]; //Set the corpse to a revivable state.
  13. if (_medicsOnline) then {
  14. //There is medics let's send them the request.
  15. [life_corpse,profileName] remoteExecCall ["life_fnc_medicRequest",independent];
  16. } else {
  17. //No medics were online, send it to the police.
  18. [life_corpse,profileName] remoteExecCall ["life_fnc_medicRequest",west];
  19. };
  20.  
  21. //Create a thread to monitor duration since last request (prevent spammage).
  22. [] spawn {
  23. ((findDisplay 7300) displayCtrl 7303) ctrlEnable false;
  24. sleep (2 * 60);
  25. ((findDisplay 7300) displayCtrl 7303) ctrlEnable true;
  26. };
Add Comment
Please, Sign In to add comment