Advertisement
rockybonne

AT snippet

Mar 18th, 2017
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. AT.sqf snippet
  2.  
  3. I removed our UID's from adminadd for obvious reasons
  4.  
  5. admin_fillSpecificMenu =
  6. {
  7. inSub = false;
  8. _ctrl = 2 call getControl;
  9. lbclear _ctrl;
  10. _ctrl ctrlSetFont "TahomaB";
  11. adminadd = ["111111111111","2222222222222"];
  12. call admin_fillsubsss;
  13. adminadd = adminadd + [" Teleport Player To Me",admint2me,"0","0","0","1",[0,0.8,1,1]];
  14. adminadd = adminadd + [" Teleport To Player",admintele,"0","0","0","1",[0,0.8,1,1]];
  15. adminadd = adminadd + [" FreeRoam Cam (RightClick to exit)",admin_frcam,"0","0","0","1",[0,0.8,1,1]];
  16. adminadd = adminadd + ["============================================================","","0","1","0","0",[]];
  17. adminadd = adminadd + [" Ban",adminBanPerm,"0","0","0","1",[0.9,0,0,1]];
  18. adminadd = adminadd + [" TempBan",adminbanTemp,"0","0","0","1",[0.9,0,0,1]];
  19. adminadd = adminadd + ["Targeted Friendly","","0","1","0","0",[]];
  20. adminadd = adminadd + [" Heal",adminheal,"0","0","0","1",[0,0.8,1,1]];
  21. adminadd = adminadd + [" Repair Vehicle",adminrepair,"0","0","0","1",[0,0.8,1,1]];
  22. adminadd = adminadd + [" Flip Near Vehicle",admin_flipvehicle,"0","0","0","1",[0,0.8,1,1]];
  23. adminadd = adminadd + [" Change Humanity",changeHumanity,"0","0","0","1",[0,0.8,1,1]];
  24. adminadd = adminadd + [" Give +2500 Humanity",adminHumanityPlus,"0","0","0","1",[0,0.8,1,1]];
  25. adminadd = adminadd + [" Give -2500 Humanity",adminHumanityMinus,"0","0","0","1",[0,0.8,1,1]];
  26. adminadd = adminadd + [" Change Coins",changeCoins,"0","0","0","1",[0,0.8,1,1]];
  27. adminadd = adminadd + [" Give +25,000 Coins",adminCoinsPlus,"0","0","0","1",[0,0.8,1,1]];
  28. adminadd = adminadd + [" Give -25,000 Coins",adminCoinsMinus,"0","0","0","1",[0,0.8,1,1]];
  29. adminadd = adminadd + [" Give Ammo",admin_give_ammo,"0","0","0","1",[0,0.8,1,1]];
  30. adminadd = adminadd + [" Clone",adminCloneTarget,"0","0","0","1",[0,0.8,1,1]];
  31.  
  32.  
  33.  
  34.  
  35. adminHumanityMinus =
  36. {
  37. {
  38. if(name _x == _this select 0)then
  39. {
  40. _humanity = _x getVariable['humanity',0];
  41. _x setVariable['humanity',_humanity-2500,true];
  42. hint format['Gave %1 -2500 Humanity!',_this select 0];
  43.  
  44. _sl = format['%1 minus 2500 Humanity to %2',name player,_this select 0];
  45. PVAH_WriteLogReq = [player,toArray _sl];
  46. publicVariableServer 'PVAH_WriteLogReq';
  47. };
  48. } forEach playableUnits;
  49. };
  50. changeCoins = {
  51. disableSerialization;
  52. _plr = objNull;
  53. {if (name _x == _this select 0) exitWith {_plr = _x;};} forEach playableUnits;
  54. if (isNull _plr) exitWith {systemchat 'Select a Player!';};
  55. if (isNull findDisplay 24) exitWith {systemchat format ['open the chat, type the amount of %1 you want to add (can be negative) and doubleClick again!',CurrencyName];};
  56.  
  57. _chat = (findDisplay 24) displayCtrl 101;
  58. _txt = ctrlText _chat;
  59. _num = 0;
  60. if (_txt != '') then {
  61. _num = parseNumber _txt;
  62. if (typeName _num != 'SCALAR') then {systemchat 'INSERT A NUMBER!';};
  63. (findDisplay 24) closeDisplay 0;
  64. };
  65.  
  66. _coins = _plr getVariable[Z_moneyVariable,0];
  67. _plr setVariable[Z_moneyVariable,_coins+_num,true];
  68. hint format['Gave %1 %2 %3!',_this select 0,_num,CurrencyName];
  69.  
  70. _sl = format['%1 %2 %4 to %3',name player,_num,_this select 0,CurrencyName];
  71. PVAH_WriteLogReq = [player,toArray _sl];
  72. publicVariableServer 'PVAH_WriteLogReq';
  73. };
  74. adminCoinsPlus = {
  75. {
  76. if (name _x == _this select 0) then {
  77. _coins = _x getVariable[Z_moneyVariable,0];
  78. _x setVariable[Z_moneyVariable,_coins + 25000,true];
  79. hint format['Gave %1 +25,000 %2!',_this select 0,CurrencyName];
  80.  
  81. _sl = format['%1 +25,000 %3 to %2',name player,_this select 0,CurrencyName];
  82. PVAH_WriteLogReq = [player,toArray _sl];
  83. publicVariableServer 'PVAH_WriteLogReq';
  84. };
  85. } forEach playableUnits;
  86. };
  87. adminCoinsMinus = {
  88. {
  89. if (name _x == _this select 0) then {
  90. _coins = _x getVariable[Z_moneyVariable,0];
  91. _x setVariable[Z_moneyVariable,_coins - 25000,true];
  92. hint format['Gave %1 -25,000 %2!',_this select 0,CurrencyName];
  93.  
  94. _sl = format['%1 -25,000 %3 to %2',name player,_this select 0,CurrencyName];
  95. PVAH_WriteLogReq = [player,toArray _sl];
  96. publicVariableServer 'PVAH_WriteLogReq';
  97. };
  98. } forEach playableUnits;
  99. };
  100. adminCloneTarget =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement