Breakroom is now Sinewave Campus. Book a meeting

SInventoryItem

العميلالأنواع
في هذا الصنفStoreCustomData
  1. الدوال
  2. StoreCustomData
  3. Use
  4. Delete
  5. الخصائص
  6. MasterID
  7. PlayerItemID
  8. Name
  9. Description
  10. Brand
  11. CustomData
الأعضاء 9
دالةStoreCustomDataUpdates the inventory items custom data, and requests a synchronisation with the inventory server.
دالةUsePlayer will 'Use' this item. (White-label only)
دالةDeletePlayer will 'Delete' this item. (White-label only)
خاصيةMasterIDThe master ID for this item - also known as the Curator ID or Item ID, this is the ID for the master item from which this copy exists.
خاصيةPlayerItemIDThe instance ID for this item - this is guaranteed to be unique per inventory item
خاصيةNameReturns the name of the inventory item
خاصيةDescriptionReturns the registered description of the inventory item in the users locale
خاصيةBrandReturns brand information about the item
خاصيةCustomDataReturns any custom data associated with this item, typically used for 'game' items

الدوال​

StoreCustomData​

bool StoreCustomData(string data)

Updates the inventory items custom data, and requests a synchronisation with the inventory server. It may not update on the server immediately, but all local calls will reflect the new data. Note: this request can be rate limited and should only be called from a user initiated action (such as clicking a button). Updates to custom data must not be initiated on a timer or regular automatic event. Access to this function can be blacklisted to specific creators if abused.

المعاملات

الاسمالنوعالقيمة الافتراضية
datastring–

القيم المرجعة

bool

مثال

Lua
Items = Space.Inventory.Items
Items[1].StoreCustomData('data1data2data3')

Use​

void Use()

Player will 'Use' this item. (White-label only)

القيم المرجعة

void

مثال

Lua
Items = Space.Inventory.Items
Items[1].Use()

Delete​

void Delete()

Player will 'Delete' this item. (White-label only)

القيم المرجعة

void

مثال

Lua
Items = Space.Inventory.Items
Items[1].Delete()

الخصائص​

MasterIDللقراءة فقط​

long MasterID {get; }

The master ID for this item - also known as the Curator ID or Item ID, this is the ID for the master item from which this copy exists.

مثال

Lua
Items = Space.Inventory.Items
iMasterID = Items[1].MasterID

PlayerItemIDللقراءة فقط​

long PlayerItemID {get; }

The instance ID for this item - this is guaranteed to be unique per inventory item

مثال

Lua
Items = Space.Inventory.Items
iPlayerItemID= Items[1].PlayerItemID

Nameللقراءة فقط​

string Name {get; }

Returns the name of the inventory item

مثال

Lua
Items = Space.Inventory.Items
iName= Items[1].Name

Descriptionللقراءة فقط​

string Description {get; }

Returns the registered description of the inventory item in the users locale

مثال

Lua
Items = Space.Inventory.Items
iDescription=Items[1].Description

Brandللقراءة فقط​

string Brand {get; }

Returns brand information about the item

مثال

Lua
Items = Space.Inventory.Items
iBrand = Items[1].Brand

CustomDataللقراءة فقط​

string CustomData {get; }

Returns any custom data associated with this item, typically used for 'game' items

مثال

Lua
Items = Space.Inventory.Items
iCustomData = Items[1].CustomData