Jump to content
kadir6185

Seize weapon and vest RPT LOG

Recommended Posts

 

I want when click seize button,  weapon+clothing+vest+headgear seize

I need help.

 

 

 

I change 

Quote

player removeItemFromUniform _x

to

Quote

player removeUniform _x;

But doesnt work.

 

RPT LOG

 

Quote

22:15:32 Error in expression <

{
if (!(_x in _exempt)) then {
player removeVest _x;
};
} forEach vestItems pl>
22:15:32   Error position: <removeVest _x;
};
} forEach vestItems pl>
22:15:32   Error Missing ;
22:15:32 File core\cop\fn_seizeClient.sqf [life_fnc_seizeClient], line 84
22:15:32 Error in expression <

{
if (!(_x in _exempt)) then {
player removeVest _x;
};
} forEach vestItems pl>
22:15:32   Error position: <removeVest _x;
};
} forEach vestItems pl>
22:15:32   Error Missing ;
22:15:32 File core\cop\fn_seizeClient.sqf [life_fnc_seizeClient], line 84

 

My fn_seizeClient.sqf

#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");

{
    if (!(_x in _exempt)) then {
        player removeWeapon _x;
    };
} forEach weapons player;

{
    if (!(_x in _exempt)) then {
        player removeUniform _x;
    };
} forEach uniformItems player;

{
    if (!(_x in _exempt)) then {
        player removeVest _x;
    };
} forEach vestItems player;

{
    if (!(_x in _exempt)) then {
        player removeItemFromBackpack _x;
    };
} forEach backpackItems player;

{
    if (!(_x in _exempt)) then {
            player removeMagazine _x;
    };
} forEach magazines player;

if (uniform player in _uniform) then {removeUniform player;};
if (vest player in _vest) then {removeVest player;};
if (headgear player in _headgear) then {removeHeadgear player;};

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

 

20170618222650_1.jpg

Share this post


Link to post
Share on other sites

You are doing it wrong, the format of removing a uniform is the following

removeUniform object

 

You are looping all uniform items, which would mean _x is an item inside the uniform. Not the uniform itself. Just remove the loop and do removeUniform command with the object (player) you want to remove the uniform from.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×