Advertisement
Guest User

fn_cellphone.sqf

a guest
Nov 28th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #include <macro.h>
  2. /*
  3. File: fn_cellphone.sqf
  4. Author: Alan
  5.  
  6. Description:
  7. Opens the cellphone menu?
  8. */
  9. private["_display","_units","_type"];
  10.  
  11. disableSerialization;
  12. waitUntil {!isNull findDisplay 3000};
  13. _display = findDisplay 3000;
  14. _units = _display displayCtrl 3004;
  15.  
  16. ctrlSetText [3003, ""];
  17. lbClear _units;
  18.  
  19. if((__GETC__(life_adminlevel) < 1)) then
  20. {
  21. ctrlShow[3020,false];
  22. ctrlShow[3021,false];
  23. };
  24. {
  25. if(alive _x && _x != player) then
  26. {
  27. switch (side _x) do
  28. {
  29. case west: {_type = "Cop"};
  30. case civilian: {_type = "Civ"};
  31. case independent: {_type = "Med"};
  32. };
  33. _units lbAdd format["%1 (%2)",_x getVariable["realname",name _x],_type];
  34. _units lbSetData [(lbSize _units)-1,str(_x)];
  35. };
  36. } foreach playableUnits;
  37.  
  38. lbSetCurSel [3004,0];
  39.  
  40. if((call life_coplevel) < 1) then
  41. {
  42. ctrlShow[3024,false];
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement