Hello.
I am assuming this is a multiplayer problem.
(Though I don't think it belongs in multiplayer section. Sry if it does but read the rest and you tell me)
At the moment, I am just giving the player the weapon he buys, originally I tried to add them to an ammo-box, but for some reason, even though you could see it in the box, it wouldn't let you pick it up. I have no idea why, but you would hit take, and it would just do nothing.
So my question is, do I have to publicvariable something in order for it to allow me to pick it up?
really right now, my biggest problem is adding magazines to the player, because I can't find a good way to see if you are carrying to many magazines, as there are different slots for different types, and count magazines player isnt really working how I would need it.
this is my script to add magazines(which works fine) but any suggestions on how to check your magazines? And would it be better/easier to just add them to a ammo-crate? (Also of course, if I was, then what was I doing wrong that was no letting me take the magazines?
_idc, 108;
_index = lbCurSel _idc;
_itemClass = lbData [_idc, _index];
_amount = parseNumber (ctrlText 109);
_temp_a = [];
for[{_i=0}, {_i < count magazines player}, {_i=_i+1}] do
{
_mag = magazines player select _i;
player sidechat format ["%1", _mag];
if (_mag == _itemClass) then
{
_temp_a = _temp_a + [_mag];
};
};
for [{_m=count _temp_a}, {_m < _amount}, {_m=_m+1}] do
{
player addMagazine _itemClass;
player groupchat "Added mag";
};