local config = {
showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
}
function onSay(cid, words, param, channel)
local players = getPlayersOnline()
local str = ""
local liczba = 0
for _, pid in ipairs(players) do
if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then
liczba = liczba + 1
str = str .. liczba .. ". " .. getCreatureName(pid) .. " (Level: " .. getPlayerLevel(pid) .. ")\n"
end
end
if liczba > 1 then
doShowTextDialog(cid, 1949, liczba .. " online players:\n" .. str)
elseif liczba == 1 then
doShowTextDialog(cid, 1949, liczba .. " online player:\n" .. str)
else
doShowTextDialog(cid, 1949, "No online players:\n" .. str)
end
return true
end