MA

[Pedido] !online

Por Maiikbarbosa1, 09 de mar. de 2012 em Archived

!online
ajuda
otserv
tibia
script
3
787
09 de março de 2012 às 11:36

Olá pessoal do xtibia Hoje estou aqui para pedir um script para vocês

assim quando eu estou logado no meu God ou Gm qualquer que seja os player que da !online meu nome aparece :

ogjltc.jpg

 

 

Eu queria que nenhum nome de Gm ou God aparese-se para nenhum player ficar pedindo itens e etc.

Estou aguardando respostas, Quem ajudar dou Rep +

VodkartV
09 de março de 2012 às 11:56

tenta deixar assim:

 

talkactions/script/online.lua

function onSay(cid, words, param, channel)
local players = getPlayersOnline()
local strings = {""}

local i, position = 1, 1
local added = false
for _, pid in ipairs(players) do
if(added) then
if(i > (position * 7)) then
strings[position] = strings[position] .. ","
position = position + 1
strings[position] = ""
else
strings[position] = i == 1 and "" or strings[position] .. ", "
end
end

if getPlayerAccess(pid) < 3 then
strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
i = i + 1
added = true
else
added = false
end
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online:")
for i, str in ipairs(strings) do
if(str:sub(str:len()) ~= ",") then
str = str .. "."
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str)
end

return true
end

09 de março de 2012 às 12:15

Funcionou, Fico muito agradecido por sua ajuda.

Rep+