Substitui o código por esse:
function onSay(player, words, param)
local total_players_online = #getOnlinePlayers()
if total_players_online > 0 then
if param == '' then
return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Seu Skill Club é " .. player:getSkillLevel(SKILL_CLUB) .. ".")
else
if player:isPremium() then
if player:isInGhostMode() then
return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Não foi encontrado nenhum jogador online com esse nome.")
else
for index, name in pairs(getOnlinePlayers()) do
if index <= total_players_online then
if param == name then
return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Skill Club de [" .. name .. "] é " .. player:getSkillLevel(SKILL_CLUB) .. ".")
else
if index == total_players_online then
return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Não foi encontrado nenhum jogador online com esse nome.")
end
end
end
end
end
else
return player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Somente jogadores VIP podem utilizar este comando para visualizar informações de outros jogadores.")
end
end
else
return true
end
end
Testa e veja se continua dando problema ao tentar pegar skill de outro player online. Lembrando que ele tem que estar online e não pode estar em modo ghost (invisível).