Hallo
Mit diesem Tutorial kann man als Cop Lizezen von Spieler entziehen.
1. Erstellt eine neue datei namens revoke_license.h in den dialog Ordner mit folgendem Inhallt:
#define BGX 0.35
#define BGY 0.2
#define BGW 0.3
class revokeLicense_Menu
{
	idd = 41000;
	movingEnable = false;
	enableSimulation = true;
	class controlsBackground {
		class RscTitleBackground:life_RscText 
		{
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
			idc = -1;
			x = BGX;
			y = BGY;
			w = BGW;
			h = (1 / 25);
		};
		class MainBackground : life_RscText
		{
			idc = -1;
			colorBackground[] = {0,0,0,0.7};
			x = BGX;
			y = BGY + (11 / 250);
			w = BGW;
			h = 0.6 - (22 / 250);
		};
		class Title : life_RscTitle
		{
			colorBackground[] = {0,0,0,0};
			idc = 41001;
			text = "Dpt. of Motor Vehicles";
			x = BGX;
			y = BGY;
			w = BGW;
			h = (1 / 25);
		};
	};
	class controls {
		class ButtonClose : life_RscButtonMenu 
		{
			idc = -1;
			text = "Close";
			onButtonClick = "closeDialog 0;";
			x = BGX;
			y = 0.8 - (1 / 25);
			w = (6.25 / 40);
			h = (1 / 25);
		};
		class ButtonOne : life_RscButtonMenu
		{
			idc = 41002;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "Driver License";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.07;
			w = 0.24;
			h = 0.038;
		};
		class ButtonTwo : life_RscButtonMenu
		{
			idc = 41003;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "Truck License";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.12;
			w = 0.24;
			h = 0.038;
		};
		class ButtonThree : life_RscButtonMenu
		{
			idc = 41004;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "Pilot License";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.17;
			w = 0.24;
			h = 0.038;
		};
		class ButtonFour : life_RscButtonMenu
		{
			idc = 41005;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "Boating License";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.22;
			w = 0.24;
			h = 0.038;
		};
		class ButtonFive : life_RscButtonMenu
		{
			idc = 41006;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "Diving License";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.27;
			w = 0.24;
			h = 0.038;
		};
		class ButtonSix : life_RscButtonMenu
		{
			idc = 41007;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "Taxi License";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.32;
			w = 0.24;
			h = 0.038;
		};
		class ButtonSeven : life_RscButtonMenu
		{
			idc = 41008;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "All Licenses";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.37;
			w = 0.24;
			h = 0.038;
		};
	};
};
	
			Alles anzeigen
	2. Öffnet eure dialog\MasterHandler.h und fügt folgendes hinzu:
3. Öffnet eure stringtable.xml und fügt folgendes dazu:
<Key ID="STR_pInAct_RevokeLicense">
            <Orignal>Lizenzen entziehen</Orignal>
        </Key>
        <Key ID="STR_Civ_RevokeLicense_Driver">
            <Original>Dein Führerschein wurde von der Polizei beschlagnahmt!</Original>
        </Key>
        <Key ID="STR_Civ_RevokeLicense_Truck">
            <Original>Dein LKW Führerschein wurde von der Polizei beschlagnahmt!</Original>
        </Key>
        <Key ID="STR_Civ_RevokeLicense_Pilot">
            <Original>Dein Flugschein wurde von der Polizei beschlagnahmt!</Original>
        </Key>
        <Key ID="STR_Civ_RevokeLicense_Boating">
            <Original>Dein Bootsschein wurde von der Polizei beschlagnahmt!</Original>
        </Key>
        <Key ID="STR_Civ_RevokeLicense_Diving">
            <Original>Deine Taucherlizez wurde von der Polizei beschlagnahmt!</Original>
        </Key>
        <Key ID="STR_Civ_RevokeLicense_Taxi">
            <Original>Dein Taxischein wurde von der Polizei beschlagnahmt!</Original>
        </Key>
        <Key ID="STR_Civ_RevokeLicense_AllMotor">
            <Original>Alle deine Fahrlizenzen wurde von der Polizei beschlagnahmt!</Original>
        </Key>
	
			Alles anzeigen
	4. Öffnet eure dialog/pInteraction.h und fügt folgendes dazu:
class ButtonEight : life_RscButtonMenu
		{
			idc = 37457;
			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
			text = "";
			sizeEx = 0.025;
			x = BGX + 0.03;
			y = BGY + 0.42;
			w = 0.24;
			h = 0.038;
		};
	
			Alles anzeigen
	
Solltet ihr schon dieser Eintrag haben, z.b. Alkoholtester dann einfach class ButtonNine erstellen.
5. Öffnet eure Functions.h und fügt folgendes unter Class Player_Menu hinzu:
6. Öffnet eure core/cop/fn_copInteractionMenu.sqf und bearbeitet folgendes:
Unter private
Etwas weiter unten folgendes einfügen
Noch etwas weiter unten das hier
Wieder etwas weiter unten
Als letztes ganz unten das hier
_Btn8 ctrlSetText localize "STR_pInAct_RevokeLicense";
_Btn8 buttonSetAction "[life_pInact_curTarget] call life_fnc_revokeLicense;";
	
	
Solltet ihr schon der Button 8 haben, einfach alles gleich machen nur mit der 9
7. Öffnet eure core/civilian/fn_removeLicenses.sqf und fügt folgendes hinzu:
// Revoking Licenses
	// Führerschein Lizenz
	case 10:
	{
		license_civ_driver = false;
		hint localize "STR_Civ_RevokeLicense_Driver";
	};
	// LKW Führerschein Lizenz
	case 11:
	{
		license_civ_truck = false;
		hint localize "STR_Civ_RevokeLicense_Truck";
	};
	// Pilotenschein Lizenz
	case 12:
	{
		license_civ_air = false;
		hint localize "STR_Civ_RevokeLicense_Pilot";
	};
	// Bootsschein Lizenz
	case 13:
	{
		license_civ_boat = false;
		hint localize "STR_Civ_RevokeLicense_Boating";
	};
	// Taucherschein Lizenz
	case 14:
	{
		license_civ_dive = false;
		hint localize "STR_Civ_RevokeLicense_Diving";
	};
	// Taxischein Lizenz
	case 15:
	{
		license_civ_taxi = false;
		hint localize "STR_Civ_RevokeLicense_Taxi";
	};
	// Alle Scheine
	case 16:
	{
		license_civ_driver = false;
		license_civ_truck = false;
		license_civ_air = false;
		license_civ_boat = false;
		license_civ_air = false;
		license_civ_dive = false;
		license_civ_taxi = false;
		hint localize "STR_Civ_RevokeLicense_AllMotor";
	};
	
			Alles anzeigen
	8. Erstellt eine neue datei namens fn_revokeLicense.sqf in euren core/pmenu Ordner mit folgendem Inhallt:
/*
	File: fn_revokeLicense.sqf
	Author: Michael Francis
	Description:
	Allows cops to revoke individual licenses, or all licenses. Vehicle related only.
*/
private["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7"];
createDialog "revokeLicense_Menu";
disableSerialization;
_curTarget = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
if(isNull _curTarget) exitWith {hint "Wrong target!"; closeDialog 0;}; //Bad target
if(!isPlayer _curTarget && side _curTarget == civilian) exitWith {hint "Cannot perform this action!"; closeDialog 0;}; //Bad side check?
_display = findDisplay 41000;
_Btn1 = _display displayCtrl 41002;
_Btn2 = _display displayCtrl 41003;
_Btn3 = _display displayCtrl 41004;
_Btn4 = _display displayCtrl 41005;
_Btn5 = _display DisplayCtrl 41006;
_Btn6 = _display DisplayCtrl 41007;
_Btn7 = _display DisplayCtrl 41008;
life_pInact_curTarget = _curTarget;
//Führerschein Lizenz
_Btn1 buttonSetAction "[[10],""life_fnc_removeLicenses"",life_pInact_curTarget,FALSE] spawn life_fnc_MP; closeDialog 0;";
//LKW Führerschein Lizenz
_Btn2 buttonSetAction "[[11],""life_fnc_removeLicenses"",life_pInact_curTarget,FALSE] spawn life_fnc_MP; closeDialog 0;";
//Pilotenschein Lizenz
_Btn3 buttonSetAction "[[12],""life_fnc_removeLicenses"",life_pInact_curTarget,FALSE] spawn life_fnc_MP; closeDialog 0;";
//Bootsschein Lizenz
_Btn4 buttonSetAction "[[13],""life_fnc_removeLicenses"",life_pInact_curTarget,FALSE] spawn life_fnc_MP; closeDialog 0;";
//Diving License
_Btn5 buttonSetAction "[[14],""life_fnc_removeLicenses"",life_pInact_curTarget,FALSE] spawn life_fnc_MP; closeDialog 0;";
//Taxi Lizenz
_Btn6 buttonSetAction "[[15],""life_fnc_removeLicenses"",life_pInact_curTarget,FALSE] spawn life_fnc_MP; closeDialog 0;";
//Alle Scheine
_Btn7 buttonSetAction "[[16],""life_fnc_removeLicenses"",life_pInact_curTarget,FALSE] spawn life_fnc_MP; closeDialog 0;";
	
			Alles anzeigen
	Viel spaß. ![]()