Advertisement
Guest User

fn_adminaspromotions.sqf

a guest
Aug 10th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_adminaspromotions.sqf
  4. Author: [MARSOF] Tom
  5.  
  6. Description:
  7. Pushes the Admin action on the targetted player + the messages that come with it.
  8.  
  9. */
  10. private["_action","_unit"];
  11. _action = [_this,1,-1,[0]] call BIS_fnc_param;
  12. _unit = lbData[15002,lbCurSel (15002)];
  13. _unit = call compile format["%1", _unit];
  14. if(isNull _unit) exitWith {hint "No unit";};
  15.  
  16. switch (_action) do {
  17. //Set Constable Cop Rank / Whitelist
  18. case 1: {
  19. [1,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
  20. [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
  21. hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
  22. closeDialog 0;
  23. };
  24. //Set Sergeant Cop Rank
  25. case 2: {
  26. [2,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
  27. [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
  28. hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
  29. closeDialog 0;
  30. };
  31. //Set Inspector Cop Rank
  32. case 3: {
  33. [3,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
  34. [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
  35. hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
  36. closeDialog 0;
  37. };
  38. //Set SuperIntendent Cop Rank
  39. case 4: {
  40. [4,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
  41. [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
  42. hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
  43. closeDialog 0;
  44. };
  45. //Set NATO Cop Rank
  46. case 5: {
  47. [5,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
  48. [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
  49. hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
  50. closeDialog 0;
  51. };
  52. //Set SAS Cop Rank
  53. case 6: {
  54. [6,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
  55. [0,"STR_RPG4YOU_promotion_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
  56. hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
  57. closeDialog 0;
  58. };
  59. //Set Public Cop Rank
  60. case 0: {
  61. [0,[profileName]] remoteExecCall ["life_fnc_adminrspromotions",_unit];
  62. [0,"STR_RPG4YOU_demoted_swat",true,[_unit getVariable["realname",name _unit],profileName]] remoteExecCall ["life_fnc_broadcast"];
  63. hint parseText format["<t color='#00ff00'><t align='center'><t size='1'>EXECUTED<br/><br/></t><t color='#FFFFFF'>You PROMOTED: </t><t color='#8cff9b'>%1</t>!",_unit getVariable["realname",name _unit]];
  64. closeDialog 0;
  65. };
  66. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement