API CanUseAddon: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
=== CanUseAddon ===
'''Definition:''' <br>
CanUseAddon(int ''itemid'') -> bool ''ret1'', {string l1 ..}
<br>
'''Description:'''<br>
check if the player can equip the addon ''itemid''
<br>
'''Arguments:'''<br>
''itemid'' [[itemid]] of addon to check
<br>
'''Returns:'''<br>
''ret1'' can use<br>
''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>
'''Example:'''<br>
<source lang="lua">CanUseAddon(12345) -> true {1, 2, 2, 2, 2}</source><br>
<br>
{{Function
{{Function
| name        = CanUseAddon
| name        = CanUseAddon

Revision as of 04:38, 1 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:
<source lang="lua">CanUseAddon(12345) -> true {1, 2, 2, 2, 2}</source>