cotoi 1 Posted July 4, 2013 I want to remove NV from players so I tryed <removeAllitems this;> and <this removeItem "NVGoggles";> but player stil lspawn with nvgoggles. Any ideea how to remove this item? Share this post Link to post Share on other sites
SavageCDN 231 Posted July 4, 2013 Try: this removeWeapon "NVGoggles"; Share this post Link to post Share on other sites
laverniusregalis 10 Posted July 4, 2013 this unassignItem "NVgoggles"; this removeItem "NVgoggles"; SavageCDN's format probably won't work, NVgoggles are considered an item and must be unassigned before they're removed. Share this post Link to post Share on other sites
Smurf 12 Posted July 4, 2013 EDIT: Damn ninjas. You have to unassign them first (move to inventory) then remove it. http://community.bistudio.com/wiki/unassignItem this unassign "Nvgoggles"; this removeitem "NVGoggles"; Share this post Link to post Share on other sites
SavageCDN 231 Posted July 4, 2013 Yeah I'm wrong..sorry not enough coffee this AM :p Share this post Link to post Share on other sites
kdk11 1 Posted July 4, 2013 removeAllAssignedItems this; Share this post Link to post Share on other sites
laverniusregalis 10 Posted July 4, 2013 removeAllAssignedItems this; But that would remove their map, radio, etc as well. Also, a handy code from 2nd Ranger: Code: { if (side _x == east) then { _x unassignItem "NVGoggles"; _x removeItem "NVGoggles"; }; } foreach allunits; You can substitute 'east' with your faction of choice, and NVGoggles with your item of choice. Share this post Link to post Share on other sites
cotoi 1 Posted July 5, 2013 Tnx for your help. I just wanted to make a mission where bluefor crushed before the misssion and lost about all their gear and now must do it with whatever gun they can find on the enemy. For that I use this code to control the gear for all units. /* use this in unitt's init: Null = [this,1] execVM "echipament.sqf";*/ _man = _this select 0; _role = _this select 1; removeAllWeapons _man; //blue units if (_role == 1) then { _man unassignItem "NVGoggles"; _man removeItem "NVGoggles"; }; if (_role == 111) then { .................................. }; //green units if (_role == 3101) then { _man unassignItem "NVGoggles"; _man removeItem "NVGoggles"; _man addweapon "hgun_P07_F"; _man addmagazine "16Rnd_9x21_Mag"; _man addmagazine "16Rnd_9x21_Mag"; _man addmagazine "16Rnd_9x21_Mag"; _man addWeapon "arifle_Mk20C_ACO_pointer_F"; //_man addItem "muzzle_snds_H"; _man addMagazine "30Rnd_556x45_Stanag_Tracer_red"; _man addMagazine "30Rnd_556x45_Stanag_Tracer_red"; _man addMagazine "30Rnd_556x45_Stanag_Tracer_red"; _man addMagazine "30Rnd_556x45_Stanag_Tracer_red"; _man addMagazine "30Rnd_556x45_Stanag_Tracer_red"; }; if (_role == 3102) then { _man unassignItem "NVGoggles"; _man removeItem "NVGoggles"; _man addweapon "hgun_P07_F"; _man addmagazine "16Rnd_9x21_Mag"; _man addmagazine "16Rnd_9x21_Mag"; _man addmagazine "16Rnd_9x21_Mag"; }; if (_role == 3103) then { ...................... }; Share this post Link to post Share on other sites
TGxAltair 10 Posted July 5, 2013 I kept making the mistake of trying to remove the item before unassigning it. Share this post Link to post Share on other sites