When a new player joins our dedicated server all current players loose all their carried ammo/magazines. Rounds in the weapon are kept.
Description
Details
- Legacy ID
- 3698236115
- Severity
- Major
- Resolution
- Fixed
- Reproducibility
- Always
- Category
- Multiplayer
Reproduced with different players disconnecting and re-joining the server.
Makes playing a team based coop online multi player challenging!
Event Timeline
Issue is specific to personalized gearscripts. Have seen this occur with multiple missions from multiple mission makers. Don't think this ticket should be deleted except if we have been doing something wrong...
-1
Never happened to me anywhere
Off-Topic:
When scripting, should probably store ammo and weapons in global variables, and play around with it - its possible to do.
oOJedi0o: please.. could you prepare and upload "minimalistic" version of your mission script in which the problem will be still reproducable? It could be very useful for us. Anyway gear and especial its MP part is still in progress, so please take my personal apology for inconvenience.
Thank you for your reply, no need to apologize. More than happy to support you with this. I must first check with our team leader regarding releasing the script which I will do tonight or tomorrow and update you asap.
I had the same issue, which was the result of a script and I believe it might be in turn a result of non local clients being able to delete the magazines of a local object.
I was solving this issue a year and half ago but can't remember if it was successfully solved or wasn't. I guess that it could be something with "removeAll" sorts of commands like removeAllMagazines, removeAllWeapons, etc. Does your script contain some these?
here is a small part of my script (wich has this issue; this kind of script works fine on Arma2 though):
mission.sqm:
position[]={1698.2432,5.5,5647.019};
azimut=-183.77901;
special="NONE";
id=0;
side="WEST";
vehicle="B_Soldier_SL_F";
player="PLAYER COMMANDER";
leader=1;
rank="LIEUTENANT";
skill=0.60000002;
init="[""PL"", this] call compile preprocessFileLineNumbers ""Orbat\USINFkitout.sqf"";group this setGroupId [""1'6""]"; description="1 Platoon / Platoon Leader";
Gear script:
removeallweapons _unit;
removeallcontainers _unit;
removeallassigneditems _unit;
_unit addWeapon "ItemMap";
_unit addWeapon "ItemCompass";
_unit addWeapon "ItemWatch";
_unit addItem "FirstAidKit";
switch (_type) do
{
case "PL": { _unit adduniform "U_B_CombatUniform_mcam_vest"; _unit addvest "V_BandollierB_khk"; _unit addheadgear "H_MilCap_mcamo"; _unit addWeapon "ItemGPS"; _unit addMagazine "HandGrenade"; _unit addMagazine "HandGrenade"; _unit addMagazine "Smokeshell"; _unit addMagazine "SmokeshellRed"; _unit addMagazine "SmokeshellGreen"; _unit addMagazine "SmokeshellGreen"; for "_i" from 0 to 6 do {_unit addMagazine "30Rnd_65x39_caseless_mag"}; _unit addMagazine "30Rnd_65x39_caseless_mag_Tracer"; _unit addWeapon "arifle_MXC_ACO_point_grip_F"; _unit addItem "optic_Hamr"; };
Hello,
The script we used has been updated, but it was very similar to the one above. The general feeling was it was the unit initilization removeallweapons _unit
If this can be resolved we're happy to retest, but you can reproduce this yourself by placing units as players and having one rejoin.
I am no editor myself but if you would like to discuss this further I would be happy to set up a teamspeak meeting with our editor.
Best wishes
Jedi
Jedi: I am a quite "slow" so sorry for that :-) but I don't get it. So just for sure: your repro is:
- place two playable units into editor with removeAllweapons in initialization line
- place some additional gearbox(for getting some weapons after removeAll script)
- start MP session with two joined players
after start:
- now in a game there are two soldiers with no weapons
- rearm through ammoBox
- disconnect and reconnect with one of them
and the result should be no magazines stored even into the player who is still connected, right?
zeko: thanks for a script.. I'm going to try Jedi's version (cause it is a little bit shorter :-) ), but the key information is that I'm working on..
Hi,
I've been using a kit script similar to the one above, and getting the same errors (magazines go away when someone jips). So I switched to init line, hoping that it would fixed it. Sadly I got the same eroor again. init gear:
this unassignItem "nvgoggles";
this removeItem "nvgoggles";
removeallWeapons this;
removeUniform this;
removeVest this;
removeHeadgear this;
removeBackpack this;
this addUniform "U_B_CombatUniform_mcam_vest";
this addVest "V_PlateCarrier1_rgr";
this addHeadgear "H_Cap_headphones";
this addBackpack "B_Kitbag_cbr";
this addItem "FirstAidKit";
this addItem "acc_flashlight";
this addItem "muzzle_snds_L";
this addItem "muzzle_snds_H";
this addMagazines ["30Rnd_65x39_case_mag_Tracer",12];
this addMagazines ["16Rnd_9x21_Mag",4];
this addMagazines ["handgrenade",2];
this addMagazines ["smokeshell",1];
this addMagazines ["DemoCharge_Remote_Mag",1];
this addWeapon "Binocular";
this addWeapon "arifle_TRG20_ACO_F";
this addWeapon "hgun_P07_F";
As far as I am aware gear works fine as long as you pick it up inside the game. It is only when you try to add it pre-game that this happens.
I did some rummaging around and it does indeed appear to be removealleapons that is cauing the issue. I modified the above init line to not use the command and then had another player jip onto my server. With removeallweapons the mags went away when he jipped, but without it nothing happened.
I have just added some code which should fix this task(since my changes I have been unable to reproduce it anymore), so as I guess it will be distributed into DEV version at night. Unfortunately stable is locked so the patch will not affect it. Please try it tomorrow and let me know
Apologies the team run stable version only. Can someone running the dev version support Japapatramtara before we can test on the next stable release?
We already distributed a new stable.. so can someone confirm if this bug has been successfully fixed?