API ConnectAddon

From Vendetta Lua
Revision as of 04:01, 19 October 2011 by Draugath (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

ConnectAddon

Definition
ConnectAddon( number  portid,  number  itemid [,  function  cb ]) ->  boolean  canconnect
Description
Attaches the addon itemid to the active ship in port portid
Arguments
Type Name Description
number portid portid of the the port
number itemid itemid of the addon
function cb function to call on completion (optional)
Returns
Type Name Description
boolean canconnect returns true if the player is docked and has an active ship otherwise nil
Notes
Example:
<source lang="lua"> -- put the addon 123 into port 2 while the player is docked to a station ConnectAddon(2, 123) -> true </source>