Jump to content
Sign in to follow this  
sparcdr

Cannot take weapon out of box.

Recommended Posts

When I add weapons to a box, I cannot take them out. I've tried sending a broadcast of the addWeaponCargo command, using local and network-aware boxes, but only the ammunition can be taken out when running as a dedicated server. I've had the issue on both a locally running dedicated server (Windows) and on my remote (Linux).

_box addWeaponCargo [_class,_amount];

add_weapon = [_box, _class];

publicVariable "add_weapon";

Where I've tried the classes for MakarovPM and Revolver, and they both show up in the box.

Share this post


Link to post
Share on other sites

Hi..

nul=[yourBoxName, "Makarov", 1] execVM "box.sqf";

_box = _this select 0;
_class = _this select 1;
_amount = _this select 2;
_box addWeaponCargoGlobal [_class, _amount];

See ArmA2 Scripting Commands: >> Click <<

:rolleyes:

*UPDATE*

I guess you used wrong classnames of the weapons: Makarov and Revolver_EP1

>> see here <<

Edited by Buliwyf

Share this post


Link to post
Share on other sites

Fixed, have to use http://community.bistudio.com/wiki/addWeaponCargoGlobal

Nothing was wrong it just wasn't synchronized.

if ((_type == 0) or (_type == 1)) then {
_box = call RPM_GetShopBox;
if (!(isNull(_box))) then {
	_class = [_item] call RPM_GetItemClass;
	if (_type == 0) then {
		_box addWeaponCargoGlobal[_class, _amount];
	};
	if  (_type == 1) then {
		_box addMagazineCargoGlobal[_class, _amount];
	};
	_additem = true;
};
};

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
Sign in to follow this  

×