API ForEachPlayer: Difference between revisions
From Vendetta Lua
Jump to navigationJump to search
split |
No edit summary |
||
Line 1: | Line 1: | ||
{{Function | |||
| name = ForEachPlayer | |||
| desc = calls ''func'' with the character id of each player in the sector. that includes bots and the sector thingy itself | |||
| arg1_name = func | |||
| arg1_type = function | |||
calls ''func'' with the character id of each player in the sector. that includes bots and the sector thingy itself | | arg1_desc = receives one argument from ForEachPlayer. func(number charid)<br> | ||
''charid'' = character id | |||
| arg1_opt = | |||
| ret1_name = | |||
| ret1_type = nil | |||
| ret1_desc = | |||
'' | | notes = '''Example:'''<br> | ||
<source lang="lua">ForEachPlayer(function (id) print(id) end)</source> | |||
'''Example:'''<br> | |||
<source lang="lua">ForEachPlayer(function (id) print(id) end)</source | |||
prints a list with all players in the sector | prints a list with all players in the sector | ||
}} |
Latest revision as of 01:57, 20 October 2011
ForEachPlayer
Type | Name | Description |
---|---|---|
function | func | receives one argument from ForEachPlayer. func(number charid) charid = character id |
Type | Name | Description |
---|---|---|
nil |
<source lang="lua">ForEachPlayer(function (id) print(id) end)</source> prints a list with all players in the sector