Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. /*
  2. File: fn_deathScreen.sqf
  3. Author: Bryan "Tonic" Boardwine
  4.  
  5. Description:
  6. Handles stuff being displayed on the death screen while
  7. it is currently active.
  8. */
  9. private["_medicsOnline","_medicsNear"];
  10. disableSerialization;
  11.  
  12. _medicsOnline = ((findDisplay 7300) displayCtrl 7304);
  13. _medicsNear = ((findDisplay 7300) displayCtrl 7305);
  14.  
  15. waitUntil {
  16. _nearby = 99999;
  17. {
  18. if (side _x == independent && alive _x && _x != player) then
  19. {
  20. _distance = (getPosATL life_corpse) distance _x;
  21. if (_distance < _nearby) then { _nearby = _distance; };
  22. };
  23. } forEach playableUnits;
  24. _medicsOnline ctrlSetText format[localize "STR_Medic_Online",[independent] call life_fnc_playerCount];
  25. if (_nearby == 99999) then { _medicsNear ctrlSetText format[localize "STR_Medic_NearbyNo",_nearby]; }
  26. else { _medicsNear ctrlSetText format[localize "STR_Medic_Near",[(round _nearby)] call life_fnc_numberText]; };
  27. sleep 1;
  28. (isNull (findDisplay 7300))
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement