1function onSay(player, words, param)
2 local hasAccess = player:getGroup():getAccess()
3 local players = Game.getPlayers()
4
5 if _DEBUG_MODE then
6 print("[TALK - PLAYERS ONLINE] " ..player:getName())
7 end
8 local i = 1
9 for _, targetPlayer in ipairs(players) do
10 if hasAccess or not targetPlayer:isInGhostMode() then
11 local isTrainer = 00
12 local tile = Tile(targetPlayer:getPosition().x, targetPlayer:getPosition().y, targetPlayer:getPosition().z)
13 local ground = tile:getGround()
14 if ground:getId() == 11062 or ground:getId() == 11063 then
15 isTrainer = 01
16 end
17
18 player:sendCancelMessage("@PlayersOnline#" ..i.. "#" ..targetPlayer:getName().. "#" ..targetPlayer:getLevel().. "#" ..targetPlayer:getVocation():getName().. "#" ..isTrainer)
19 i = i + 1
20 end
21 end
22 return false
23end
24