sina alex 1 Posted October 19, 2020 hey everyone i have a problem in this code: main tip : player stay near sign and in holdaction spawn a code that will apply new loadout on him but problem is there i see this loadout applyed on others too. server is dedicate code work but applyed on all not that player who call it. of course i use a group the caller to prevent from apply to all with this code _pg = group _caller; and code will apply to forEach units _pg; help me up to prevent to apply to others [s4, "LoadOUT", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 2", "_caller distance _target < 2", {"laa" remoteExec ["playSound"];}, {hint "iw";}, {_pg = group _caller; { removeAllWeapons _x; removeAllItems _x; removeAllAssignedItems _x; removeUniform _x; removeVest _x; removeBackpack _x; removeHeadgear _x; removeGoggles _x; _x addWeapon "hlc_smg_MP5N"; _x addPrimaryWeaponItem "hlc_30Rnd_9x19_B_MP5"; _x addWeapon "rhsusf_weap_m9"; _x addHandgunItem "rhsusf_mag_15Rnd_9x19_FMJ"; _x forceAddUniform "B_BLK_BLK_soldier_F_uniform"; _x addVest "IRI_V_Sheriff_BA_TB"; _x addWeapon "Binocular"; _x addItemToUniform "FirstAidKit"; for "_i" from 1 to 2 do {_x addItemToUniform "hlc_30Rnd_9x19_B_MP5";}; _x addItemToUniform "SmokeShell"; _x addItemToUniform "MiniGrenade"; for "_i" from 1 to 3 do {_x addItemToVest "hlc_30Rnd_9x19_B_MP5";}; _x addItemToVest "rhsusf_mag_15Rnd_9x19_FMJ"; for "_i" from 1 to 5 do {_x addItemToVest "rhs_mag_mk84";}; for "_i" from 1 to 2 do {_x addItemToVest "MiniGrenade";}; _x addItemToVest "SmokeShell"; _x addHeadgear "H_PASGT_basic_black_F"; _x addGoggles "G_Balaclava_TI_G_blk_F"; _x linkItem "ItemMap"; _x linkItem "ItemGPS"; _x linkItem "ItemCompass"; _x linkItem "ItemWatch"; _x linkItem "ItemRadio"; _x linkItem "NVGoggles_OPFOR"; [_x,"Pad_A3_01","male01per"] call BIS_fnc_setIdentity; [_x,"rw_Service_qe"] call BIS_fnc_setUnitInsignia; } forEach units _pg; hint "NO"; }, {hint "Lm";}, [], 2, 1000, false, false, true ] remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true]; Share this post Link to post Share on other sites
sina alex 1 Posted October 19, 2020 need add a line to fix the problem?? deleteGroup _pg; Share this post Link to post Share on other sites