API ForEachPlayer

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

ForEachPlayer

Definition
ForEachPlayer( function  func) ->  nil
Description
calls func with the character id of each player in the sector. that includes bots and the sector thingy itself
Arguments
Type Name Description
function func receives one argument from ForEachPlayer. func(number charid)
charid = character id
Returns
Type Name Description
nil
Notes
Example:
<source lang="lua">ForEachPlayer(function (id) print(id) end)</source> prints a list with all players in the sector