/***
* Add preset kits to self or target
*
*
***/
_target = cursorTarget;
_kit = _this select 0;
if(_target isKindOf "Man") then {
GearAdd = (vehicle _target);
}
else
{
GearAdd = (vehicle player);
};
if(_kit == "NavCloseRange") then {
removeAllWeapons GearAdd;
removeAllItems GearAdd;
removebackpack GearAdd;
GearAdd addWeapon 'ItemWatch';
GearAdd addMagazine '30Rnd_9x19_MP5SD';
GearAdd addMagazine '30Rnd_9x19_MP5SD';
GearAdd addMagazine '30Rnd_9x19_MP5SD';
GearAdd addMagazine '30Rnd_9x19_MP5SD';
GearAdd addMagazine 'ItemPainkiller';
GearAdd addMagazine 'ItemPainkiller';
GearAdd addMagazine '6Rnd_45ACP';
GearAdd addMagazine '6Rnd_45ACP';
GearAdd addMagazine '6Rnd_45ACP';
GearAdd addMagazine '6Rnd_45ACP';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBloodbag';
GearAdd addMagazine 'ItemBloodbag';
GearAdd addMagazine 'ItemEpinephrine';
GearAdd addMagazine 'ItemEpinephrine';
GearAdd addMagazine 'ItemMorphine';
GearAdd addMagazine 'ItemMorphine';
GearAdd addWeapon 'Binocular_Vector';
GearAdd addWeapon 'ItemCompass';
GearAdd addWeapon 'MP5SD';
GearAdd addWeapon 'ItemMatchbox_DZE';
GearAdd addWeapon 'ItemCrowbar';
GearAdd addWeapon 'ItemFlashlightRed';
GearAdd addWeapon 'Itemtoolbox';
GearAdd addWeapon 'ItemHatchet_DZE';
GearAdd addWeapon 'revolver_EP1';
GearAdd addBackpack 'DZ_GunBag_EP1';
cutText [format["Navigation Training Close Range Gear given to player %1",GearAdd],"PLAIN DOWN"]; titleFadeOut 10;
};
if (_kit == "NavLongRange") then {
removeAllWeapons GearAdd;
removeAllItems GearAdd;
removebackpack GearAdd;
GearAdd addWeapon 'M4SPR';
GearAdd addMagazine '30Rnd_556x45_Stanag';
GearAdd addMagazine '30Rnd_556x45_Stanag';
GearAdd addMagazine '30Rnd_556x45_Stanag';
GearAdd addMagazine '30Rnd_556x45_Stanag';
GearAdd addMagazine 'ItemPainkiller';
GearAdd addMagazine 'ItemPainkiller';
GearAdd addMagazine '15Rnd_9x19_M9SD';
GearAdd addMagazine '15Rnd_9x19_M9SD';
GearAdd addMagazine '15Rnd_9x19_M9SD';
GearAdd addMagazine '15Rnd_9x19_M9SD';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBandage';
GearAdd addMagazine 'ItemBloodbag';
GearAdd addMagazine 'ItemBloodbag';
GearAdd addMagazine 'ItemEpinephrine';
GearAdd addMagazine 'ItemEpinephrine';
GearAdd addMagazine 'ItemMorphine';
GearAdd addMagazine 'ItemMorphine';
GearAdd addWeapon 'Binocular';
GearAdd addWeapon 'ItemWatch';
GearAdd addWeapon 'M9SD';
GearAdd addWeapon 'ItemKnife';
GearAdd addWeapon 'ItemFlashlightRed';
GearAdd addWeapon 'ItemCompass';
GearAdd addBackpack 'DZ_British_ACU';
cutText [format["Navigation Training Long Range Gear given to player %1",GearAdd],"PLAIN DOWN"]; titleFadeOut 10;
};
The intention is i can give people set loadouts when i need to, this code works fine on myself but not on target.
I see the player receive the gear but it reverts a second later.
My best guess is that the way i am doing this is only working clientside but to give a target gear requires it to be run server side. if anyone that knows the solution can post i would be grateful.

