Advertisement
Guest User

Untitled

a guest
Apr 30th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. //AlPMaker
  2. _max = 10; snext = false; plist = []; pselect5 = "";
  3. {if ((getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach entities "CAManBase";
  4. {if ((count crew _x) > 0) then {{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach crew _x;};} foreach (entities "LandVehicle" + entities "Air" + entities "Ship");
  5. smenu =
  6. {
  7. _pmenu = [["",true]];
  8. for "_i" from (_this select 0) to (_this select 1) do
  9. {_arr = [format['%1', plist select (_i)], [12], "", -5, [["expression", format ["pselect5 = plist select %1;", _i]]], "1", "1"]; _pmenu set [_i + 2, _arr];};
  10. if (count plist > (_this select 1)) then {_pmenu set [(_this select 1) + 2, ["Next", [13], "", -5, [["expression", "snext = true;"]], "1", "1"]];}
  11. else {_pmenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];};
  12. _pmenu set [(_this select 1) + 3, ["Exit", [13], "", -5, [["expression", "pselect5 = 'exit';"]], "1", "1"]];
  13. showCommandingMenu "#USER:_pmenu";
  14. };
  15. _j = 0; _max = 10; if (_max>9) then {_max = 10;};
  16. while {pselect5 == ""} do
  17. {
  18. [_j, (_j + _max) min (count plist)] call smenu; _j = _j + _max;
  19. WaitUntil {pselect5 != "" or snext};
  20. snext = false;
  21. };
  22.  
  23. tempList = nil;
  24.  
  25. if (pselect5 != "exit") then
  26. {
  27. _name = pselect5;
  28.  
  29. {
  30. if(name _x == _name) then
  31. {
  32. _tempException = getPlayerUID _x;
  33. tempList = [
  34. "_tempException"
  35. ];
  36. //forum Code
  37. "Freeze" addPublicVariableEventHandler { //creating commands to run
  38. _UID2 = getPlayerUID player ; //getting local UID from client running the script
  39. _UID = getPlayerUID _name;
  40.  
  41. if (_UID == _UID2) then{
  42. player enablesimulation false; //do i use the semi-colon in this?
  43. }
  44. }
  45. _tempException = nil;
  46. tempList = [
  47. "_tempException"
  48. ];
  49. };
  50. } forEach entities "CAManBase";
  51. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement