ele vai ficar assim:
14:25 [Red Skull = 10 Frags Black Skull = 20 Frags] 14:25 Você tem 0 frags hoje, 0 essa semana e 0 esse mês. seu ultimo frag foi em fulano papapap
Haha voce viu isso no meu ot neh ?
Esse vem no tfs
só editar.
Vou compartilhar com voce por um REP. ( sou novo aqui xd )
local config = {
advancedFragList = getBooleanFromString(getConfigValue("advancedFragList"))
}
function onSay(cid, words, param, channel)
local time = os.time()
local times = {today = (time - 86400), week = (time - (7 * 86400))}
local contents = {day = {}, week = {}, month = {}}
local result = db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC")
if(result:getID() ~= -1) then
repeat
local content = {
name = result:getDataString("name"),
level = result:getDataInt("level"),
date = result:getDataInt("date")
}
if(content.date > times.today) then
table.insert(contents.day, content)
elseif(content.date > times.week) then
table.insert(contents.week, content)
else
table.insert(contents.month, content)
end
until not result:next()
result:free()
end
local size = {
day = table.maxn(contents.day),
week = table.maxn(contents.week),
month = table.maxn(contents.month)
}
if(config.advancedFragList) then
local result = "Frags gained today: " .. size.day .. "."
if(size.day > 0) then
for _, content in ipairs(contents.day) do
result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level
end
result = result .. "\n"
end
result = result .. "\nFrags gained this week: " .. (size.day + size.week) .. "."
if(size.week > 0) then
for _, content in ipairs(contents.week) do
result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level
end
result = result .. "\n"
end
result = result .. "\nFrags gained this month: " .. (size.day + size.week + size.month) .. "."
if(size.month > 0) then
for _, content in ipairs(contents.month) do
result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level
end
result = result .. "\n"
end
local skullEnd = getPlayerSkullEnd(cid)
if(skullEnd > 0) then
result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)
end
doPlayerPopupFYI(cid, result)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "[Red Skull = 10 Frags Black Skull = 20 Frags]") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você tem " .. size.day .. " frags hoje, " .. (size.day + size.week) .. " essa semana e " .. (size.day + size.week + size.month) .. " esse mês.")
if(size.day > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Ultimo frag em " .. os.date("%d %B %Y %X", contents.day[1].date) .. " no level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").")
end
local skullEnd = getPlayerSkullEnd(cid)
if(skullEnd > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sua " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull vai sair em " .. os.date("%d %B %Y %X", skullEnd))
end
end
return true
end
Esse comando online é legal tambem, me manda pm que eu te mando ele.
Ele fica assim olha :
14:31 30 player(s) online:
14:31 Iron [150], Omg If [15], Staysz [226], Dara die [147], Eucalipto Rosinha [15], Texas Pvp [188], Miss Tira [200],
14:31 Joker [108], Allanziin Styler [171], Mago Net [200], Chegueipraarrepiar [122], Chapolin [152], Alma Perdida [203], Colirioh Hollister [142],
14:31 Fat Boy [15], Shan Yuan Le [220], Daanzera szz [197], Dhustt [221], Cannabis [198], Authentic Zero [109], Colirioh Uczysz [211],
14:31 GOD Victor [129], Naulpsy [211], Zorro [173], Tatetitotu [204], Jack Tequila [216], Juininho Joga Facil [201], Gordoo [179],
14:31 Maskrowiek [15], Account Manager [1].
Vocações: 7 Sorcerer • 13 Druid • 1 Paladin • 8 Knight.
14:31 1 Staff online: GOD Victor [Admin]



info
Grupo: Campones
Registrado: 25/07/12
Posts: 93
Reputação: 0
nesse modelo