Aide pour saisir les objets

Quelqu’un serai comment retirer les armes des rebelles et civils sans les démenotter ? merci

non

car il aurais de l’abus tu trouve pas ?

Fuzz Il parle de la saisie d’arme en Policier je pense…

Faire en sorte de la poser par terre je pense pas que ce soit possible, mais la supprimer oui.

Moi j’ai rajouté un bouton dans le menu windows des policiers pour enlever la tenue et les armes du suspect menotté.

Après les policiers ont des règles assez strictes donc ils l’utilisent avec modération.

Joker Pourrais tu nous partagé tout. Système ? Ce serait vraiment super sympa ! Merci !

Joker Idem , je serais bien content , car je me pose la question de comment faire depuis longtemps :slight_smile:

Aircoifft Arrow_Dark

Je peux pas détailler sinon je vais devoir limite faire un tuto juste pour ça. Mais en gros vous devez :

  1. dans dialog/pInteraction.h vous rajouter un bouton dans la classe pInteraction_Menu (vous faites un copié collé du ButtonSix ou ButtonSeven selon le dernier que vous avez et vous changez l’idc et la position sur l’axe Y)

  2. dans core/cop/fn_copInteractionMenu :

En haut du fichier vous rajouter l’id de votre bouton (pour moi c’est ça)

#define Btn8 37458  

vous rajoutez votre variable locale dans private

vous liez votre variable à votre bouton comme pour les autres :

_Btn8 = _display displayCtrl Btn8;  

et en bas vous rajoutez les actions liées à votre bouton (je vous passe mon code, à adapter selon vos besoins) :

// Supprime la tenue et les armes du suspect menotté (à changer si les flics en abusent) Joker  
_Btn8 ctrlSetText "Saisir Tenue/Armes";  
_Btn8 buttonSetAction "[life_pInact_curTarget] call {_suspect = (_this select 0); removeUniform _suspect; _suspect removeWeaponGlobal (primaryWeapon _suspect); _suspect removeWeaponGlobal (secondaryWeapon _suspect); _suspect removeWeaponGlobal (handgunWeapon _suspect);};";  

Merci beaucoup guys , J’aime beaucoup ce site car la communauté s’entraide énormément et sont la à n’importe quelle heure ! xD

Merci Joker !

salut moi j’ai un système ,le policier pose une caisse au sol(achetable au marcher policier) puis il fait touche action et il y a un bouton pour retirer tous les arme et munition du joueur dans la caisse comme sa le policier peut verifier si il a des arme illegal ou non et le civile peut recupere si tous et en regle.

seul inconvénient on pers le chargeur qui étais pressent dans l’arme.

voila le lien vers mon topic

http://www.altisliferpg.com/topic/6679-help-script-retirer-arme-civile/

salut moi j’ai un système ,le policier pose une caisse au sol(achetable au marcher policier) puis il fait touche action et il y a un bouton pour retirer tous les arme et munition du joueur dans la caisse comme sa le policier peut verifier si il a des arme illegal ou non et le civile peut recupere si tous et en regle.

seul inconvénient on pers le chargeur qui étais pressent dans l’arme.

voila le lien vers mon topic

http://www.altisliferpg.com/topic/6679-help-script-retirer-arme-civile/

Bonne idée :slight_smile:

Joker J’ai mit ton ce que tu as mit dans tes codes mais ça ne marche pas, chez moi on ne voit rien d’écrit quand on n’appuie sur le boutton windows et quand je clique dessus rien ne se passe.

Voici mon fichie pInteraction:

#define BGX 0.35

#define BGY 0.2

#define BGW 0.3

class pInteraction_Menu

{

idd = 37400;  

movingEnabled = 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 = 37401;  

        text = "$STR_pInAct_Title";  

        x = BGX;  

        y = BGY;  

        w = BGW;  

        h = (1 / 25);  

    };  

};  

  

class controls  

{  

    class ButtonClose : life_RscButtonMenu  

    {  

        idc = -1;  

        //shortcuts[] = {0x00050000 + 2};  

        text = "$STR_Global_Close";  

        onButtonClick = "closeDialog 0;";  

        x = BGX;  

        y = 0.8 - (1 / 25);  

        w = (6.25 / 40);  

        h = (1 / 25);  

    };  

      

    class ButtonOne : life_RscButtonMenu  

    {  

        idc = 37450;  

        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.07;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonTwo : life_RscButtonMenu  

    {  

        idc = 37451;  

        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.12;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonThree : life_RscButtonMenu  

    {  

        idc = 37452;  

        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.17;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonFour : life_RscButtonMenu  

    {  

        idc = 37453;  

        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.22;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonFive : life_RscButtonMenu  

    {  

        idc = 37454;  

        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.27;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonSix : life_RscButtonMenu  

    {  

        idc = 37455;  

        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.32;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonSeven : life_RscButtonMenu  

    {  

        idc = 37456;  

        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.37;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonEight : life_RscButtonMenu                      <<<<<<<<<<<–----------------------------------------- J'ai rajouter ceci  

    {  

        idc = 37458;  

        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;  

    };  

};  

};

class vInteraction_Menu

{

idd = 37400;  

movingEnabled = 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.45 - (22 / 250);  

    };  

      

    class Title : life_RscTitle  

    {  

        colorBackground[] = {0,0,0,0};  

        idc = 37401;  

        text = "$STR_vInAct_Title";  

        x = BGX;  

        y = BGY;  

        w = BGW;  

        h = (1 / 25);  

    };  

};  

  

class controls  

{  

    class ButtonClose : life_RscButtonMenu  

    {  

        idc = -1;  

        //shortcuts[] = {0x00050000 + 2};  

        text = "$STR_Global_Close";  

        onButtonClick = "closeDialog 0;";  

        x = BGX;  

        y = 0.65 - (1 / 25);  

        w = (6.25 / 40);  

        h = (1 / 25);  

    };  

      

    class ButtonOne : life_RscButtonMenu  

    {  

        idc = 37450;  

        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.07;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonTwo : life_RscButtonMenu  

    {  

        idc = 37451;  

        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.12;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonThree : life_RscButtonMenu  

    {  

        idc = 37452;  

        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.17;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonFour : life_RscButtonMenu  

    {  

        idc = 37453;  

        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.22;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonFive : life_RscButtonMenu  

    {  

        idc = 37454;  

        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.27;  

        w = 0.24;  

        h = 0.038;  

    };  

      

    class ButtonSix : life_RscButtonMenu  

    {  

        idc = 37455;  

        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.32;  

        w = 0.24;  

        h = 0.038;  

    };  

};  

};

et mon cop interaction menu

/*

File: fn_copInteractionMenu.sqf  

Author: Bryan "Tonic" Boardwine  

  

Description:  

Replaces the mass addactions for various cop actions towards another player.  

*/

#define Btn1 37450

#define Btn2 37451

#define Btn3 37452

#define Btn4 37453

#define Btn5 37454

#define Btn6 37455

#define Btn7 37456

#define Btn8 37457

#define Btn8 37458

#define Title 37401

private["_display","_curTarget","_Btn1","_Btn2","_Btn3","_Btn4","_Btn5","_Btn6","_Btn7"];

if(!dialog) then {

createDialog "pInteraction_Menu";  

};

disableSerialization;

_curTarget = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;

if(isNull _curTarget) exitWith {closeDialog 0;}; //Bad target

if(_curTarget isKindOf “House_F”) exitWith {

if((nearestObject [[16019.5,16952.9,0],"Land_Dome_Big_F"]) == _curTarget OR (nearestObject [[16019.5,16952.9,0],"Land_Research_house_V1_F"]) == _curTarget) then {  

    _display = findDisplay 37400;  

    _Btn1 = _display displayCtrl Btn1;  

    _Btn2 = _display displayCtrl Btn2;  

    _Btn3 = _display displayCtrl Btn3;  

    _Btn4 = _display displayCtrl Btn4;  

    _Btn5 = _display displayCtrl Btn5;  

    _Btn6 = _display displayCtrl Btn6;  

    _Btn7 = _display displayCtrl Btn7;  

    _Btn8 = _display displayCtrl Btn8;  

    life_pInact_curTarget = _curTarget;  

      

    _Btn1 ctrlSetText localize "STR_pInAct_Repair";  

    _Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_repairDoor;";  

      

    _Btn2 ctrlSetText localize "STR_pInAct_CloseOpen";  

    _Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_doorAnimate;";  

    _Btn3 ctrlShow false;  

    _Btn4 ctrlShow false;  

    _Btn5 ctrlShow false;  

    _Btn6 ctrlShow false;  

    _Btn7 ctrlShow false;  

} else {  

    closeDialog 0;  

};  

};

if(!isPlayer _curTarget && side _curTarget == civilian) exitWith {closeDialog 0;}; //Bad side check?

_display = findDisplay 37400;

_Btn1 = _display displayCtrl Btn1;

_Btn2 = _display displayCtrl Btn2;

_Btn3 = _display displayCtrl Btn3;

_Btn4 = _display displayCtrl Btn4;

_Btn5 = _display displayCtrl Btn5;

_Btn6 = _display displayCtrl Btn6;

_Btn7 = _display displayCtrl Btn7;

life_pInact_curTarget = _curTarget;

//Set Unrestrain Button

_Btn1 ctrlSetText localize “STR_pInAct_Unrestrain”;

_Btn1 buttonSetAction “[life_pInact_curTarget] call life_fnc_unrestrain; closeDialog 0;”;

//Set Check Licenses Button

_Btn2 ctrlSetText localize “STR_pInAct_checkLicenses”;

_Btn2 buttonSetAction “[[player],”“life_fnc_licenseCheck”",life_pInact_curTarget,FALSE] spawn life_fnc_MP";

//Set Search Button

_Btn3 ctrlSetText localize “STR_pInAct_SearchPlayer”;

_Btn3 buttonSetAction “[life_pInact_curTarget] spawn life_fnc_searchAction; closeDialog 0;”;

//Set Escort Button

if((_curTarget getVariable[“Escorting”,false])) then {

_Btn4 ctrlSetText localize "STR_pInAct_StopEscort";  

_Btn4 buttonSetAction "[life_pInact_curTarget] call life_fnc_stopEscorting; [life_pInact_curTarget] call life_fnc_copInteractionMenu;";  

} else {

_Btn4 ctrlSetText localize "STR_pInAct_Escort";  

_Btn4 buttonSetAction "[life_pInact_curTarget] call life_fnc_escortAction; closeDialog 0;";  

// Supprime la tenue et les armes du suspect menotté (à changer si les flics en abusent) <<<<<<<–-------------------------- ICI

_Btn8 ctrlSetText “Saisir Tenue/Armes”;

_Btn8 buttonSetAction “[life_pInact_curTarget] call {_suspect = (_this select 0); removeUniform _suspect; _suspect removeWeaponGlobal (primaryWeapon _suspect); _suspect removeWeaponGlobal (secondaryWeapon _suspect); _suspect removeWeaponGlobal (handgunWeapon _suspect);};”;

};

//Set Ticket Button

_Btn5 ctrlSetText localize “STR_pInAct_TicketBtn”;

_Btn5 buttonSetAction “[life_pInact_curTarget] call life_fnc_ticketAction;”;

_Btn6 ctrlSetText localize “STR_pInAct_Arrest”;

_Btn6 buttonSetAction “[life_pInact_curTarget] call life_fnc_arrestAction;”;

_Btn7 ctrlSetText localize “STR_pInAct_PutInCar”;

_Btn7 buttonSetAction “[life_pInact_curTarget] call life_fnc_putInCar;”;

//Check that you are near a place to jail them.

if(!((player distance (getMarkerPos “police_hq_1”) < 30) OR (player distance (getMarkerPos “police_hq_2”) < 30) OR (player distance (getMarkerPos “cop_spawn_3”) < 30) OR (player distance (getMarkerPos “cop_spawn_5”) < 30))) then

{

_Btn6 ctrlEnable false;  

};

tu as mal placé

  _Btn8 = _display displayCtrl Btn8;  

Tu l’as mis dans la partie qui concerne les interactions avec les maisons