API ConnectAddon

From Vendetta Lua
Revision as of 21:56, 25 January 2009 by Chefkoch (Talk | contribs) (split)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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