See: #1103
Made vehicle gear always accessible from inside.
Also added optional variable to prevent stealing from backpacks by
non-friendlies at traders. Thanks to @maca134 for the method.
Wait for response from server to verify safe was saved and logged before
proceeding with deleting safe object.
Tested and confirmed this solves #1413. Most likely helps with #1503
too.
Related to #1567, so I made this a function so it can be reused. People
should call this whenever they are adding a toolbelt item which the
player may already have. It has localized strings and handles spawning
the weapon holder on water, land and rooftop.
Tested both the sledgehammer and key copying. Confirmed all three
conditions are working.
Players can get around this by getting another player to lock the vehicle as they're getting out. The action command only works if the vehicle is unlocked, using the moveInX commands it moves them instantly back in with no animation (better imo) and works if the vehicle is locked.
TraderItemList and TraderCatList should be initialized as arrays, not numbers. Fixes this error:
```
Error in expression < 0;
if (_index < 0) exitWith {};
while {count TraderItemList < 1} do { sleep 1; >
Error position: <count TraderItemList < 1} do { sleep 1; >
Error count: Type Number, expected Array,Config entry
File z\addons\dayz_code\compile\player_traderMenuHive.sqf, line 174
```
See: https://github.com/vbawol/DayZ-Epoch/issues/1616
Tested buying and selling to all the stary and base traders as well as the boat dealer with these changes. No more error or problems.
TraderItemList and TraderCatList should be initialized as arrays, not numbers. Fixes this error:
```
Error in expression < 0;
if (_index < 0) exitWith {};
while {count TraderItemList < 1} do { sleep 1; >
Error position: <count TraderItemList < 1} do { sleep 1; >
Error count: Type Number, expected Array,Config entry
File z\addons\dayz_code\compile\player_traderMenuHive.sqf, line 174
```
See: https://github.com/vbawol/DayZ-Epoch/issues/1616
Tested buying and selling to all Stary and Bash traders as well as the boat dealer with these changes. No more error or problems.
The deleteGroup command requires the group to be local to the machine executing it:
https://community.bistudio.com/wiki/deleteGroup
When a player changes clothes a new group is created. The player is switched into a new unit in the new group, and then his old group is left empty. Because the old group is local to the player, it will not be deleted by server_cleanupGroups until he disconnects and it is transferred to the server.
We should delete the old group immediately rather than wait for the player to disconnect. This will prevent the excessive accumulation of empty groups when players change clothes a lot. It will help with the seagull spawn issue which happens when there are more than 144 groups on side WEST:
https://community.bistudio.com/wiki/createGroup