Difference between revisions of "API ConnectAddon"
From Vendetta Lua
(split) |
|||
Line 1: | Line 1: | ||
− | + | {{Function | |
− | + | | name = ConnectAddon | |
− | + | | desc = Attaches the addon ''itemid'' to the active ship in port ''portid'' | |
− | + | | arg1_name = portid | |
− | + | | arg1_type = number | |
− | Attaches the addon ''itemid'' to the active ship in port ''portid'' | + | | arg1_desc = [[portid]] of the the port |
− | + | | arg1_opt = | |
− | + | | arg2_name = itemid | |
− | + | | arg2_type = number | |
− | + | | arg2_desc = itemid of the addon | |
− | + | | arg2_opt = | |
− | + | | arg3_name = cb | |
− | + | | arg3_type = function | |
− | + | | arg3_desc = function to call on completion | |
− | + | | arg3_opt = true | |
− | '''Example:'''<br> | + | | ret1_name = canconnect |
+ | | ret1_type = boolean | ||
+ | | ret1_desc = returns true if the player is docked and has an active ship otherwise nil | ||
+ | | notes = '''Example:'''<br> | ||
<source lang="lua"> | <source lang="lua"> | ||
-- put the addon 123 into port 2 while the player is docked to a station | -- put the addon 123 into port 2 while the player is docked to a station | ||
ConnectAddon(2, 123) -> true | ConnectAddon(2, 123) -> true | ||
</source> | </source> | ||
+ | }} |
Latest revision as of 04:01, 19 October 2011
ConnectAddon
Type | Name | Description |
---|---|---|
number | portid | portid of the the port |
number | itemid | itemid of the addon |
function | cb | function to call on completion (optional) |
Type | Name | Description |
---|---|---|
boolean | canconnect | returns true if the player is docked and has an active ship otherwise nil |
-- put the addon 123 into port 2 while the player is docked to a station ConnectAddon(2, 123) -> true