Difference between revisions of "API CanUseAddon"

From Vendetta Lua
Jump to: navigation, search
(split)
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== CanUseAddon ===
+
{{Function
'''Definition:''' <br>
+
|name        =CanUseAddon
CanUseAddon(int ''itemid'') -> bool ''ret1'', {string l1 ..}
+
|desc        =check if the player can equip the addon ''itemid''
<br>
+
|arg1_name    =itemid
'''Description:'''<br>
+
|arg1_type    =number
check if the player can equip the addon ''itemid''
+
|arg1_desc    =[[itemid]] of addon to check
<br>
+
|ret1_name    =ret1
'''Arguments:'''<br>
+
|ret1_type    =boolean
''itemid'' [[itemid]] of addon to check
+
|ret1_desc    =can use
<br>
+
|ret2_name    ={string l1 ...}
'''Returns:'''<br>
+
|ret2_type    =table
''ret1'' can use<br>
+
|ret2_desc    =license requirements of the item at the current station (1-5) (only returned for local addons and if the player is docked with a station)
''l1'' license requirements of the item at the current station (1-5) (only returned for local addons and if the player is docked with a station)<br>
+
|notes        ='''Example:'''<br>
'''Example:'''<br>
+
 
<source lang="lua">CanUseAddon(12345) -> true {1, 2, 2, 2, 2}</source><br>
 
<source lang="lua">CanUseAddon(12345) -> true {1, 2, 2, 2, 2}</source><br>
<br>
+
}}

Latest revision as of 09:00, 5 April 2011

CanUseAddon

Definition

CanUseAddon( number  itemid) ->  boolean  ret1,  table  {string l1 ...}
Description

check if the player can equip the addon itemid
Arguments

Type Name Description
number itemid itemid of addon to check
Returns

Type Name Description
boolean ret1 can use
table {string l1 ...} license requirements of the item at the current station (1-5) (only returned for local addons and if the player is docked with a station)
Notes

Example:

CanUseAddon(12345) -> true {1, 2, 2, 2, 2}