Ir para conteúdo

[Encerrado] Distro


SilvaPereira

Posts Recomendados

Preciso de uma Distro urgente ... pos estou com o mapa global server e estou com um problema nos frags

sempre que mato alguem ele nao conta o frag , concequentemente eu nao consigo pegear redskull nem blackskull , e acho que isso e um problema na minha distro.

 

preciso que alguem me ensine a substituir a distro , pos nao estou conseguindo.

aguardando.

Link para o comentário
Compartilhar em outros sites

tenta esse:

 

 

local config = {
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
advancedFragList = getBooleanFromString(getConfigValue('advancedFragList'))
}

function onSay(cid, words, param, channel)
if(not config.useFragHandler) then
	return false
end

local time = os.time()
local times = {today = (time - 86400), week = (time - (7 * 86400))}

local contents, result = {day = {}, week = {}, month = {}}, 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 `k`.`war` = 0 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_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.")
	if(size.day > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").")
	end

	local skullEnd = getPlayerSkullEnd(cid)
	if(skullEnd > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd))
	end
end

return true
end

 

 

 

ou

 

 

local config = {
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
advancedFragList = getBooleanFromString(getConfigValue('advancedFragList'))
}

function onSay(cid, words, param, channel)
if(not config.useFragHandler) then
	return false
end

local time = os.time()
local times = {today = (time - 86400), week = (time - (7 * 86400))}

local contents, result = {day = {}, week = {}, month = {}}, 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_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.")
	if(size.day > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").")
	end

	local skullEnd = getPlayerSkullEnd(cid)
	if(skullEnd > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd))
	end
end

return true
end

 

 

Editado por fireelement
Link para o comentário
Compartilhar em outros sites

Acho que o problema esteja na database, usa mysql?

 

sim uso mysql , na verdade eu nao tinha esse problema antes de por ele pra mysql ... lembro que testei ele antes de começar a mecher !!

 

tenta esse:

 

 

local config = {
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
advancedFragList = getBooleanFromString(getConfigValue('advancedFragList'))
}

function onSay(cid, words, param, channel)
if(not config.useFragHandler) then
	return false
end

local time = os.time()
local times = {today = (time - 86400), week = (time - (7 * 86400))}

local contents, result = {day = {}, week = {}, month = {}}, 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 `k`.`war` = 0 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_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.")
	if(size.day > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").")
	end

	local skullEnd = getPlayerSkullEnd(cid)
	if(skullEnd > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd))
	end
end

return true
end

 

 

 

ou

 

 

local config = {
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')),
advancedFragList = getBooleanFromString(getConfigValue('advancedFragList'))
}

function onSay(cid, words, param, channel)
if(not config.useFragHandler) then
	return false
end

local time = os.time()
local times = {today = (time - 86400), week = (time - (7 * 86400))}

local contents, result = {day = {}, week = {}, month = {}}, 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_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.")
	if(size.day > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").")
	end

	local skullEnd = getPlayerSkullEnd(cid)
	if(skullEnd > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd))
	end
end

return true
end

 

 

 

isso e pra por aonde ?

Link para o comentário
Compartilhar em outros sites

Prezado, acesse localhost.com/phpmyadmin, abra o executer do PHPMYADMIN e coloque isto:

 

 

TRUNCATE TABLE `killers`, `player_killers`, `players_deaths`;

 

Espero Ter Ajudado!

 

Ajudei? REP+

 

Grato.

 

 

 

dando esse erro aki

 

consulta SQL:

TRUNCATE TABLE `killers` ,

`player_killers` ,

`players_deaths`

Mensagens do MySQL : b_help.png

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `player_killers`, `players_deaths`' at line 1

Link para o comentário
Compartilhar em outros sites

  • 1 month later...
  • 5 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...