Difference between revisions of "API ConnectAddon"
From Vendetta Lua
(split) |
(No difference)
|
Revision as of 21:56, 25 January 2009
ConnectAddon
Definition:
ConnectAddon(int portid, int itemid, function cb) -> bool canconnect
Description:
Attaches the addon itemid to the active ship in port portid
Arguments:
portid portid of the the port
itemid itemid of the addon
cb function to call on completition (optional)
Returns:
canconnect returns true if the player is docked and has an active ship otherwise nil
Example:
-- put the addon 123 into port 2 while the player is docked to a station ConnectAddon(2, 123) -> true