Ferix

Untitled

Jun 25th, 2018
89
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "..\..\script_macros.hpp"
  2. /*
  3.     File: fn_civInteractionMenu.sqf
  4.     Author: Bryan "Tonic" Boardwine
  5.  
  6.     Description:
  7.     Replaces the mass addactions for various cop actions towards another player.
  8. */
  9. if(playerSide != civilian) exitWith {};
  10. #define Btn1 37450
  11. #define Btn2 37451
  12. #define Btn3 37452
  13. #define Btn4 37453
  14. #define Btn5 37454
  15. #define Btn6 37455
  16. #define Btn7 37456
  17. #define Btn8 37457
  18. #define Btn9 37458
  19. #define Title 37401
  20.  
  21. private["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7","_Btn8","_Btn9","_dis","_currplayer"];
  22. if(!dialog) then {
  23.     createDialog "pInteraction_Menu";
  24. };
  25. disableSerialization;
  26. _curTarget = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
  27. if(isNull _curTarget) exitWith {closeDialog 0;}; //Bad target
  28. _currplayer = _curtarget;
  29.  
  30. if(!isPlayer _curTarget && side _curTarget == civilian) exitWith {closeDialog 0;}; //Bad side check?
  31. _display = findDisplay 37400;
  32. _dis = 8;
  33. _Btn1 = _display displayCtrl Btn1;
  34. _Btn2 = _display displayCtrl Btn2;
  35. _Btn3 = _display displayCtrl Btn3;
  36. _Btn4 = _display displayCtrl Btn4;
  37. _Btn5 = _display displayCtrl Btn5;
  38. _Btn6 = _display displayCtrl Btn6;
  39. _Btn7 = _display displayCtrl Btn7;
  40. _Btn8 = _display displayCtrl Btn8;
  41. _Btn9 = _display displayCtrl Btn9;
  42. life_pInact_curTarget = _curTarget;
  43.  
  44. //Set Unrestrain Button
  45. _Btn1 ctrlSetText localize "STR_pInAct_Unrestrain";
  46. _Btn1 buttonSetAction "[life_pInact_curTarget] call life_fnc_unrestrain; closeDialog 0;";
  47. if((_curTarget getVariable["Escorting",true])) then {_Btn1 ctrlEnable false;};
  48. if(_currplayer distance player > _dis) then {_Btn1 ctrlEnable false;};
  49.  
  50. //Set Escort Button
  51.  
  52. if (player getVariable ["isEscorting",false]) then {
  53.     _Btn2 ctrlSetText localize "STR_pInAct_StopEscort";
  54.     _Btn2 buttonSetAction "[] call life_fnc_stopEscorting; closeDialog 0;";
  55. } else {
  56.     _Btn2 ctrlSetText localize "STR_pInAct_Escort";
  57.     _Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_escortAction; closeDialog 0;";
  58. };
  59.  
  60. /*if((_curTarget getVariable["Escorting",false])) then {
  61.     _Btn2 ctrlSetText localize "STR_pInAct_StopEscort";
  62.     _Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_stopEscorting; [life_pInact_curTarget] call life_fnc_civInteractionMenu;";
  63.     if(_currplayer distance player > _dis) then {_Btn2 ctrlEnable false;};
  64. } else {
  65.     _Btn2 ctrlSetText localize "STR_pInAct_Escort";
  66.     _Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_escortAction; closeDialog 0;";
  67.     if(_currplayer distance player > _dis) then {_Btn2 ctrlEnable false;};
  68. };*/
  69.  
  70.  
  71. //Put in Car Button
  72. _Btn3 ctrlSetText localize "STR_pInAct_PutInCar";
  73. _Btn3 buttonSetAction "[life_pInact_curTarget] call life_fnc_putInCar; closeDialog 0;";
  74. if(_currplayer distance player > _dis) then {_Btn3 ctrlEnable false;};
  75.  
  76. //Pat Down Button
  77. _Btn4 ctrlSetText localize "STR_pInAct_PatDown";
  78. _Btn4 buttonSetAction "[life_pInact_curTarget] call life_fnc_patdown; closeDialog 0;";
  79. if(_currplayer distance player > _dis) then {_Btn4 ctrlEnable false;};
  80.  
  81. _Btn5 ctrlShow false;
  82. _Btn6 ctrlShow false;
  83. _Btn7 ctrlShow false;
  84. _Btn8 ctrlShow false;
  85. _Btn9 ctrlShow false;
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×