Skip to main content

registerItem

warning

It is not recommended to register the item from a different resource. On resource start if someone is on the server and his inventory loads slower while the item is not registered from the another resource, then the item will may be deleted from him.

info

This function should be triggered both on clientside and serverside.

Use the function in a shared .lua file!

Export function to register an item data from another resource.

  • name: string
  • itemData: RegisteredItemData
exports["avp_inv_4"]:registerItem(name, itemData)