Français Solved Problème lors de la fouille des civils pour retirer les objets illégaux

  • Auteur de la discussion Auteur de la discussion 3D_Fr
  • Date de début Date de début

3D_Fr

User
30/4/20
81
7
1
300
www.twitch.tv
Bonjour a tous,

j ai un souci quand je veux fouille un civil sa le fouille me sa retire directement les truc illégale sans les voire pour avoir des preuve d arrestation
voici mon bouton du script Radial Menu Cop

Code:
        class button_9 {   //fouille des civ
            displayName = "STR_pInAct_Seize";
            buttonAction = "[cursorObject] spawn life_fnc_seizePlayerAction; closeDialog 0;";
            buttonToolTip = "";
            side[] = {civ};
            disable = false;
            condition = "call life_coplevel > getNumber (missionConfigFile >> 'Life_Settings' >> 'seize_minimum_rank')";
        };

Cordialement
 
Dernière édition par un modérateur:
Solution
Tu peux remplacer ton fn_seizeClient.sqf par celui-ci :
Code:
#include "..\..\script_macros.hpp"
/*
    File: fn_seizeClient.sqf
    Author: Daniel "Skalicon" Larusso

    Description:
    Removes the players weapons client side
*/
private ["_exempt","_uniform","_vest","_headgear"];
_exempt = LIFE_SETTINGS(getArray,"seize_exempt");
_headgear = LIFE_SETTINGS(getArray,"seize_headgear");
_vest = LIFE_SETTINGS(getArray,"seize_vest");
_uniform = LIFE_SETTINGS(getArray,"seize_uniform");

_illegalItems = "";

{
    if (!(_x in _exempt)) then {
        player removeWeapon _x;
        _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
    };
} forEach weapons player;

{
    if (!(_x in...
Tu peux remplacer ton fn_seizeClient.sqf par celui-ci :
Code:
#include "..\..\script_macros.hpp"
/*
    File: fn_seizeClient.sqf
    Author: Daniel "Skalicon" Larusso

    Description:
    Removes the players weapons client side
*/
private ["_exempt","_uniform","_vest","_headgear"];
_exempt = LIFE_SETTINGS(getArray,"seize_exempt");
_headgear = LIFE_SETTINGS(getArray,"seize_headgear");
_vest = LIFE_SETTINGS(getArray,"seize_vest");
_uniform = LIFE_SETTINGS(getArray,"seize_uniform");

_illegalItems = "";

{
    if (!(_x in _exempt)) then {
        player removeWeapon _x;
        _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
    };
} forEach weapons player;

{
    if (!(_x in _exempt)) then {
        player removeItemFromUniform _x;
        _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
    };
} forEach uniformItems player;

{
    if (!(_x in _exempt)) then {
        player removeItemFromVest _x;
        _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
    };
} forEach vestItems player;

{
    if (!(_x in _exempt)) then {
        player removeItemFromBackpack _x;
        _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
    };
} forEach backpackItems player;

{
    if (!(_x in _exempt)) then {
            player removeMagazine _x;
        _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
    };
} forEach magazines player;

if (uniform player in _uniform) then {
    removeUniform player;
    _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
};

if (vest player in _vest) then {
    removeVest player;
    _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
};

if (headgear player in _headgear) then {
    removeHeadgear player;
    _illegalItems = _illegalItems + format ["- %1 <br/>",(([_x] call life_fnc_fetchCfgDetails) select 1)];
};

[] call SOCK_fnc_updateRequest;

hint parseText format ["Les objets illégaux suivants vont être retirés :<br\>%1",_illegalItems];

titleText[localize "STR_NOTF_SeizeIllegals","PLAIN"];

J'ai ajouté un message qui devrait de dire tous les objets illégaux qui ont été saisis
 
Solution