Hallo Liebe NN Community ich bin’s wieder Deathman mit einem neuen TUT.
Ich habe mich mal mit der Player Interaktion Menü befasst und habe diese umgeschrieben so dass sie wenigstens bissel übersichtlicher ist, ich habe zusätzlich anstatt Text in den Buttons Bilder genommen.
Dieses TUT ist vom Aufbau her das gleiche wie mein Fahrzeug Interactions Menu von mir.
!!ACHTUNG BITTE BEACHTEN!!
Ich habe die Standard Datei von Altis Life 5.0 bearbeitet, wenn jemand mehr hinzufügen will der schreibt mich per Steam (Steam Account im Anhang) an oder Schreibt mir eine Privat Nachricht bei Native Network.
Nun fangen wir an.
Schritt 1.Geht in die core\pmenu\ und erstellt dort folgende Datei --> fn_pInteractionMenu.sqf und Kopiert folgenden Inhalt hinein.
Spoiler anzeigen
#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","_seizeRank","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7","_Btn8","_Btn9"];
disableSerialization;
_curTarget = param [0,objNull,[objNull]];
_seizeRank = LIFE_SETTINGS(getNumber,"seize_minimum_rank");
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 west: {createDialog "p_interaction_menu_9";};
//case independent: {createDialog "";};
//case civilian: {createDialog "";};
};
};
_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 west:
{
if (player getVariable ["isEscorting",false]) then {
{ _x ctrlShow false; } forEach [_btn1,_btn2,_btn3,_btn4,_btn6,_btn7,_btn8,_btn9];
};
_Btn1 ctrlShow false;
_Btn2 ctrlShow false;
_Btn3 ctrlShow false;
_Btn4 ctrlShow false;
_Btn5 ctrlShow false;
_Btn6 ctrlShow false;
_Btn7 ctrlShow false;
_Btn8 ctrlShow false;
_Btn9 ctrlShow false;
_btn1 ctrlSetText "textures\interaction\Player\icon_close.paa";
_btn1 ctrlSetToolTip "Menü Schließen";
_btn1 buttonSetAction "closeDialog 0;";
_btn2 ctrlSetText "textures\interaction\Player\icon_unrestrain.paa";
_btn2 ctrlSetToolTip "Freilassen";
_btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_unrestrain;";
_btn3 ctrlSetText "textures\interaction\Player\icon_checklicens.paa";
_btn3 ctrlSetToolTip "Lizenzen Überprüfen";
_btn3 buttonSetAction "closeDialog 0; [player] remoteExecCall [""life_fnc_licenseCheck"",life_pInact_curTarget];";
_btn4 ctrlSetText "textures\interaction\Player\icon_searchplayer.paa";
_btn4 ctrlSetToolTip "Spieler Durchsuchen";
_btn4 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_searchAction;";
if (player getVariable ["isEscorting",false]) then {
_btn5 ctrlSetText "textures\interaction\Player\icon_StopEscorting.paa";
_btn5 ctrlSetToolTip "Eskortieren stoppen";
_btn5 buttonSetAction "closeDialog 0; [] call life_fnc_stopEscorting;";
_btn5 ctrlEnable true;
} else {
_btn5 ctrlSetText "textures\interaction\Player\icon_Escorting.paa";
_btn5 ctrlSetToolTip "Eskortieren";
_btn5 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_escortAction;";
_btn5 ctrlEnable true;
};
_btn6 ctrlSetText "textures\interaction\Player\icon_ticket.paa";
_btn6 ctrlSetToolTip "Strafzettel ausstellen";
_btn6 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_ticketAction;";
_btn7 ctrlSetText "textures\interaction\Player\icon_PutinJail.paa";
_btn7 ctrlSetToolTip "Ins Gefängnis stecken";
_btn7 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_arrestAction;";
_btn8 ctrlSetText "textures\interaction\Player\icon_PutInTheCar.paa";
_btn8 ctrlSetToolTip "Ins Fahrzeug setzen";
_btn8 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_putInCar;";
_btn9 ctrlSetText "textures\interaction\Player\icon_weapons.paa";
_btn9 ctrlSetToolTip "Waffen beschlagnahmen";
_btn9 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_seizePlayerAction;";
if (FETCH_CONST(life_coplevel) < _seizeRank) then {_btn9 ctrlEnable false;};
{
if ((player distance (getMarkerPos _x) <30)) exitWith { _btn7 ctrlEnable true;};
} forEach LIFE_SETTINGS(getArray,"sendtoJail_locations");
{
_x ctrlSetFade 0;
_x ctrlCommit 3;
_x ctrlShow true;
} forEach [_Btn1,_Btn2,_Btn3,_Btn4,_Btn5,_Btn6,_Btn7,_Btn8,_Btn9];
};
/*
case independent:
{
//Hier Kann noch was Kommen(Selbst Anpassbar).
//Hier bei bin ich gerne Behilflich schreibt mir auf steam oder auf native-network Privat
//Mein Steam Konto Verlinke ich oben
};
case civilian
{
//Hier Kann noch was Kommen(Selbst Anpassbar).
//Hier bei bin ich gerne Behilflich schreibt mir auf steam oder auf native-network Privat
//Mein Steam Konto Verlinke ich oben
};
*/
};
Alles anzeigen
Schritt 2.Geht in die core\functions\ und öffnet dort die --> fn_actionKeyHandler.sqf und sucht [] call life_fnc_copInteractionMenu; und ersetzt es durch [] call life_fnc_pInteractionMenu; .
Schritt 3. Geht in den Dialog Ordner und erstellt dort folgende Datei --> PlayerInteraction.hpp und Kopiert folgenden Inhalt hinein.
Spoiler anzeigen
class p_interaction_menu_9 {
idd = 8000;
name = "p_interaction_menu_9";
movingenable = false;
enablesimulation = true;
class controlsBackground
{
class Life_RscTitleBackground : Life_RscText
{
colorbackground[] = {0, 0, 0, 0.7};
idc = 8001;
x = 0.445833333333334 * safezoneW + safezoneX;
y = 0.829315481986369 * safezoneH + safezoneY;
w = 0.1609375 * safezoneW;
h = 0.14342064264849 * safezoneH;
};
class Life_RscStructuredText : Life_RscStructuredText
{
x = 0.446614583333333 * safezoneW + safezoneX;
y = 0.795520934761441 * safezoneH + safezoneY;
h = 0.0268646543330088 * safezoneH;
w = 0.161458333333333 * safezoneW;
text = "Spieler Interaction Menü";
idc = 78987;
class Attributes {
font = "PuristaBold";
align = "center";
valign = "middle";
};
};
class Life_RscTitleBackgroundText : Life_RscText
{
colorbackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.446614583333333 * safezoneW + safezoneX;
y = 0.795520934761441 * safezoneH + safezoneY;
w = 0.1609375 * safezoneW;
h = 0.0272638753651412 * safezoneH;
};
};
class controls
{
class close_pic : Life_RscPictureButton
{
idc = 8002;
x = 0.6061805 * safezoneW + safezoneX;
y = 0.827078870496592 * safezoneH + safezoneY;
w = 0.0206316 * safezoneW;
h = 0.033 * safezoneH;
};
class pic_1 : Life_RscPictureButton
{
idc = 8003;
x = 0.452100666666667 * safezoneW + safezoneX;
y = 0.835446932814022 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
class pic_2 : Life_RscPictureButton
{
idc = 8004;
x = 0.490034666666667 * safezoneW + safezoneX;
y = 0.835446932814022 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
class pic_3 : Life_RscPictureButton
{
idc = 8005;
x = 0.528142333333334 * safezoneW + safezoneX;
y = 0.835446932814022 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
class pic_4 : Life_RscPictureButton
{
idc = 8006;
x = 0.452100666666667 * safezoneW + safezoneX;
y = 0.905554040895813 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
class pic_5 : Life_RscPictureButton
{
idc = 8007;
x = 0.490034666666667 * safezoneW + safezoneX;
y = 0.905554040895813 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
class pic_6 : Life_RscPictureButton
{
idc = 8008;
x = 0.528142333333334 * safezoneW + safezoneX;
y = 0.905554040895813 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
class pic_7 : Life_RscPictureButton
{
idc = 8009;
x = 0.566726583333333 * safezoneW + safezoneX;
y = 0.835446932814022 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
class pic_8 : Life_RscPictureButton
{
idc = 8010;
x = 0.566726583333333 * safezoneW + safezoneX;
y = 0.905554040895813 * safezoneH + safezoneY;
w = 0.0332135 * safezoneW;
h = 0.0574449853943525 * safezoneH;
};
};
};
Alles anzeigen
Schritt 4. Geht in den Dialog Ordner und öffnet die --> common.hpp und fügt folgendes dort ein (Falls dies schon vorhanden ist könnt ihr diesen Schritt Überspringen).
Spoiler anzeigen
class Life_RscPictureButton
{
idc = -1;
type = 11;
style = 48;
animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
colorBackground[] = {1,1,1,0.8};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground2[] = {0.75,0.75,0.75,1};
color[] = {1,1,1,0.7};
colorActive[] = {1,1,1,1};
colorFocused[] = {0,0,0,1};
color2[] = {0,0,0,1};
colorText[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.25};
period = 1.2;
periodFocus = 1.2;
periodOver = 1.2;
borderSize = 0.0;
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
font = "PuristaMedium";
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1};
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
soundEscape[] ={"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
x = 0;
y = 0;
w = 0.095589;
h = 0.039216;
text = "";
};
Alles anzeigen
Schritt 5. Geht in den Dialog Ordner und öffnet die --> MasterHandler.hpp und schreibt am Ende folgendes rein #include "PlayerInteraction.hpp" .
Schritt 6. Geht in eure --> Functions.hpp und fügt bei dem Class Player_Menu folgendes ein class pInteractionMenu {}; , nun geht ihr hoch zur class Cop und entfernt dort class copInteractionMenu {}; .
Schritt 7. Nun nur noch die Icons einfügen unter textures\interaction\Player <--- dieser Pfad ist keine Pflicht, die Icons findest du unten im Anhang
Natürlich gibt es auch ein Bild
So jetzt sind wir Fertig
Bei Fehlern an mich eine Nachricht oder in die Kommentare
Gruß Deathman