local config = {
showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
}
function onSay(cid, words, param, channel)
local str = ""
local t = getPlayersOnline()
local len = {}
for i = 1, math.floor(#t*0.75) do
if((config.showGamemasters or getPlayerCustomFlagValue(t[i], PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(t[i], PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(t[i]) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(t[i]))) then
if #len < 1 then
str = str..""..getCreatureName(t[i]).."["..getPlayerLevel(t[i]).."]"
table.insert(len,1)
else
str = str..", "..getCreatureName(t[i]).."["..getPlayerLevel(t[i]).."]"
end
end
end
if #t > 1 then
doPlayerSendTextMessage(cid, 27, "[".. #t .."] player" .. (#t ~= 1 and 's') .." online : \n"..str..", ....... \n-->To see the rest visit www.online.com<-- ")
else
doPlayerSendTextMessage(cid, 27,"1 player online :\n "..getCreatureName(cid).."["..getPlayerLevel(cid).."].")
end
return true
end