API ForEachPlayer

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

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

ForEachPlayer

Definition:
ForEachPlayer(function func(int charid)) -> nil
Description:
calls func with the character id of each player in the sector. that includes bots and the sector thingy itself
This function is called by the toplist when you open it.
Arguments:
func gets called for each buddy
ncharid character id

Example:

ForEachPlayer(function (id) print(id) end)

prints a list with all players in the sector