wiki.sine.space | sinespace

Difference between revisions of "Scripting/SInventory"

From wiki.sine.space
Jump to: navigation, search
(Created page with "The SInventory class allows you to access a users inventory ==Members== {{ScriptFunction|void|Authorize|();|Prompts the user to grant access to inventory to the script. Big n...")
 
(Added simple example to SInventory .Authorize() .Items .RequestRefresh())
Line 2: Line 2:
  
 
==Members==
 
==Members==
{{ScriptFunction|void|Authorize|();|Prompts the user to grant access to inventory to the script. Big nasty warning box.}}
+
{{ScriptFunction|void|Authorize|();|Prompts the user to grant access to inventory to the script. Big nasty warning box.|5=
{{ScriptFunction|SInventoryItem|Items[]|{ get; }|Returns the array of the users current inventory items}}
+
<pre> Space.Inventory.Authorize()</pre>}}
{{ScriptFunction|void|RequestRefresh|();|Forces a check for external changes to the users inventory, can only be called once every 60 seconds}}
+
  
 +
{{ScriptFunction|void|RequestRefresh|();|Forces a check for external changes to the users inventory, can only be called once every 60 seconds|5=
 +
<pre>Space.Inventory.RequestRefresh()</pre>}}
 +
 +
==Properties==
 +
{{ScriptFunction|SInventoryItem|Items[]|{ get; }|Returns the array of the users current inventory items|5=
 +
<pre>invItems = Space.Inventory.Items</pre>}}
  
 
{{Scripting Navbox}}
 
{{Scripting Navbox}}

Revision as of 10:17, 12 December 2020

The SInventory class allows you to access a users inventory

Members

Authorize

void Authorize ();

Prompts the user to grant access to inventory to the script. Big nasty warning box.

 Space.Inventory.Authorize()


RequestRefresh

void RequestRefresh ();

Forces a check for external changes to the users inventory, can only be called once every 60 seconds

Space.Inventory.RequestRefresh()


Properties

Items[]

SInventoryItem Items[] { get; }

Returns the array of the users current inventory items

invItems = Space.Inventory.Items