API ForEachBuddy

From Vendetta Lua
Jump to: navigation, search

ForEachBuddy

Definition:
ForEachBuddy(function func(string name, bool isonline, int sectorid)) -> nil
Description:
calls func with the name, if the player is online for each of your buddies as well as his position if the player is currently online
Arguments:
func gets called for each buddy
name name of the buddy
isonline true if the player is online else false
sectorid location of player as sectorid
Example:

ForEachBuddy(function (name, isonline, pos) print(name .." "..tostring(isonline).." "..tostring(pos)) end)

prints a list with your buddies and their status