| 1 | --[[ |
| 2 | Copyright (C) 2014 HarpyWar ([email protected]) |
| 3 | |
| 4 | This file is a part of the PvPGN Project http://pvpgn.pro |
| 5 | Licensed under the same terms as Lua itself. |
| 6 | ]]-- |
| 7 | |
| 8 | |
| 9 | -- Get count of all online users |
| 10 | function users_count() |
| 11 | local count = 0 |
| 12 | for i,account in pairs(api.server_get_users()) do |
| 13 | count = count + 1 |
| 14 | end |
| 15 | return count |
| 16 | end |
| 17 | |
| 18 | -- Get count of all server account that were used by the server |
| 19 | function accounts_count() |
| 20 | local count = 0 |
| 21 | for i,account in pairs(api.server_get_users(true)) do |
| 22 | count = count + 1 |
| 23 | end |
| 24 | return count |
| 25 | end |
| 26 |