#include "..\..\script_macros.hpp"
/*
File: fn_pInteractionMenu.sqf
Author: Deathman & Maxos
Steam Konto Link Deathman: https://steamcommunity.com/id/deathman2002/
Description:
Player Interaction Menu
*/
private ["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7","_Btn8","_Btn9"];
disableSerialization;
_curTarget = param [0,objNull,[objNull]];
if (player getVariable ["Escorting", false]) then {
if (isNull _curTarget) exitWith {closeDialog 0;}; //Bad target
if (!isPlayer _curTarget && side _curTarget isEqualTo civilian) exitWith {closeDialog 0;}; //Bad side check?
if (player distance _curTarget > 4 ) exitWith {closeDialog 0;}; // Prevents menu accessing from far distances.
};
if(!dialog) then
{
switch (playerside) do
{
case civilian: {createDialog "p_interaction_menu_9";};
};
};
_display = findDisplay 8000;
_background = _display displayCtrl 8001;
_background ctrlSetFade 0;
_background ctrlCommit 5;
_btn1 = _display displayCtrl 8002;
_btn2 = _display displayCtrl 8003;
_btn3 = _display displayCtrl 8004;
_btn4 = _display displayCtrl 8005;
_btn5 = _display displayCtrl 8006;
_btn6 = _display displayCtrl 8007;
_btn7 = _display displayCtrl 8008;
_btn8 = _display displayCtrl 8009;
_btn9 = _display displayCtrl 8010;
life_pInact_curTarget = _curTarget;
switch (playerside) do
{
case civilian:
{
_btn1 ctrlSetText "textures\interaction\Player\icon_close.paa";
_btn1 ctrlSetToolTip "Menu Interaction";
_btn1 buttonSetAction "closeDialog 0;";
_btn2 ctrlSetText "textures\interaction\Player\icon_checklicens.paa";
_btn2 ctrlSetToolTip "Donner C.I";
_Btn2 buttonSetAction "[0,life_vInact_curTarget] spawn the_programmer_identity_fnc_IdentityShowCard;";
_btn3 ctrlSetText "textures\interaction\Player\icon_searchplayer.paa";
_btn3 ctrlSetToolTip "Présenter Permis.";
_Btn3 buttonSetAction "[life_vInact_curTarget] spawn the_programmer_identity_fnc_IdentityShowPermis;";
// Boutons Libre
_Btn4 ctrlShow false;
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
_Btn7 ctrlShow false;
_Btn8 ctrlShow false;
_Btn9 ctrlShow false;
};
};