Attachments not workingFixed

After adding support for the armor slot, the flashlight and laser sight stopped turning on after recovery.

I was able to reproduce this issue. It seems to be because when k1lly0u made the latest update, he replaced the MoveToContainer call with the classic parent/position/Insert approach which he does in many of his plugins. Since k1lly0u was active enough to make the latest update, I'll leave it to him to make the fix for now.

If you want to quick patch your copy of the plugin, you can replace this:

item.parent = itemContainer;
item.position = itemData.position;
itemContainer.Insert(item);

With this:

if (!item.MoveToContainer(itemContainer, itemData.position) && !item.MoveToContainer(itemContainer))
    item.Remove();

Or with this:

item.position = itemData.position;
item.SetParent(itemContainer);

I had the same issue until I load the previous update before this one. Also the weaponracks were crashing players when you place a weapon there because of this issue with attachments.

NKXTQs24ExGTuL8.jpg WhiteThunder

I was able to reproduce this issue. It seems to be because when k1lly0u made the latest update, he replaced the MoveToContainer call with the classic parent/position/Insert approach which he does in many of his plugins. Since k1lly0u was active enough to make the latest update, I'll leave it to him to make the fix for now.

If you want to quick patch your copy of the plugin, you can replace this:

item.parent = itemContainer;
item.position = itemData.position;
itemContainer.Insert(item);

With this:

if (!item.MoveToContainer(itemContainer, itemData.position) && !item.MoveToContainer(itemContainer))
    item.Remove();

Or with this:

item.position = itemData.position;
item.SetParent(itemContainer);
thank you, it helped
NKXTQs24ExGTuL8.jpg WhiteThunder

I was able to reproduce this issue. It seems to be because when k1lly0u made the latest update, he replaced the MoveToContainer call with the classic parent/position/Insert approach which he does in many of his plugins. Since k1lly0u was active enough to make the latest update, I'll leave it to him to make the fix for now.

If you want to quick patch your copy of the plugin, you can replace this:

item.parent = itemContainer;
item.position = itemData.position;
itemContainer.Insert(item);

With this:

if (!item.MoveToContainer(itemContainer, itemData.position) && !item.MoveToContainer(itemContainer))
    item.Remove();

Or with this:

item.position = itemData.position;
item.SetParent(itemContainer);

So which one?

so if this is the original:

 if (item != null)
                        {
                            item.parent = itemContainer;
                            item.position = itemData.position;
                            itemContainer.Insert(item);
                        }
I would replace that with:
 if (!item.MoveToContainer(itemContainer, itemData.position) && !item.MoveToContainer(itemContainer))
    item.Remove();
 or 

 if (item != null)
                        {
                            item.parent = itemContainer;
                            item.position = itemData.position;
                            item.SetParent(itemContainer);
                        }

k1lly0u fixed it in the latest update.

I see it thank you👍

Locked automatically