Ir para conteúdo
  • Cadastre-se

(Resolvido)Membros da staff esta no !rank


Ir para solução Resolvido por Vodkart,

Posts Recomendados

Base: server 10.10 

Qual erro está surgindo/O que você procura?

membros da staff: ex. [ADM] [CM] [Game Master] [MOD] [TUTOR]

estão aparecendo no ranking quero remover eles de todos os ranks ..

modaldialog2 = {
	title = "Rank System",
	message = "Selecione a classificação que você quer ver:",
	buttons = {
		{ id = 1, value = "Ver" },
		{ id = 2, value = "Sair" },
	},
	buttonEnter = 1,
	buttonEscape = 2,
	choices = {
		{ id = 1, value = "Rank Soco" },
		{ id = 2, value = "Rank Clava" },
		{ id = 3, value = "Rank Espada" },
		{ id = 4, value = "Rank Machado" },
		{ id = 5, value = "Rank Distancia" },
		{ id = 6, value = "Rank Escudo" },
		{ id = 7, value = "Rank Pesca" },
		{ id = 8, value = "Rank Magia" },
		{ id = 9, value = "Rank Level" }
	},
	popup = false
}

function callback2(cid, button, choice)
	if (button == 1) then
		local str = ""
		if (choice == 1) then
			str = "--[ Rank Soco ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 0 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 2) then
			str = "--[ Rank Clava ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 1 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 3) then
			str = "--[ Rank Espada ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 2 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 4) then
			str = "--[ Rank Machado ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 3 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 5) then
			str = "--[ Rank Distancia ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 4 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 6) then
			str = "--[ Rank Escudo ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 5 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 7) then
			str = "--[ Rank Pesca ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 6 ORDER BY `value` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 8) then
			str = "--[ Rank Magia ]--\n"
			query = db.getResult("SELECT `maglevel`, `name` FROM `players` WHERE `group_id` < 3 ORDER BY `maglevel` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("maglevel") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 9) then
			str = "--[ Rank Level ]--\n"
			query = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` < 3 ORDER BY `experience` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("level") .. "]"
				k = k + 1 until not query:next()
			end
		end
		doShowTextDialog(cid, 5785, str)
	end
end
	
function onSay(cid, words, param)
	addDialog(modaldialog2, 1002, cid, callback2);
	return true
end

 

Link para o post
Compartilhar em outros sites
modaldialog2 = {
	title = "Rank System",
	message = "Selecione a classificação que você quer ver:",
	buttons = {
		{ id = 1, value = "Ver" },
		{ id = 2, value = "Sair" },
	},
	buttonEnter = 1,
	buttonEscape = 2,
	choices = {
		{ id = 1, value = "Rank Soco" },
		{ id = 2, value = "Rank Clava" },
		{ id = 3, value = "Rank Espada" },
		{ id = 4, value = "Rank Machado" },
		{ id = 5, value = "Rank Distancia" },
		{ id = 6, value = "Rank Escudo" },
		{ id = 7, value = "Rank Pesca" },
		{ id = 8, value = "Rank Magia" },
		{ id = 9, value = "Rank Level" }
	},
	popup = false
}
function getGroupDb(player_id)
	local query = db.getResult("SELECT `group_id` FROM `players` WHERE `id`= "..player_id)
	return query:getDataInt("group_id")
end
function callback2(cid, button, choice)
	if (button == 1) then
		local str = ""
		if (choice == 1) then
			str = "--[ Rank Soco ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 0 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 2) then
			str = "--[ Rank Clava ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 1 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 3) then
			str = "--[ Rank Espada ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 2 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 4) then
			str = "--[ Rank Machado ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 3 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 5) then
			str = "--[ Rank Distancia ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 4 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 6) then
			str = "--[ Rank Escudo ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 5 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 7) then
			str = "--[ Rank Pesca ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 6 ORDER BY `value` DESC LIMIT 20;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 8) then
			str = "--[ Rank Magia ]--\n"
			query = db.getResult("SELECT `maglevel`, `name` FROM `players` WHERE `group_id` < 3 ORDER BY `maglevel` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("maglevel") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 9) then
			str = "--[ Rank Level ]--\n"
			query = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` < 3 ORDER BY `experience` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("level") .. "]"
				k = k + 1 until not query:next()
			end
		end
		doShowTextDialog(cid, 5785, str)
	end
end
	
function onSay(cid, words, param)
	addDialog(modaldialog2, 1002, cid, callback2);
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
1 hora atrás, Vodkart disse:

modaldialog2 = {
	title = "Rank System",
	message = "Selecione a classificação que você quer ver:",
	buttons = {
		{ id = 1, value = "Ver" },
		{ id = 2, value = "Sair" },
	},
	buttonEnter = 1,
	buttonEscape = 2,
	choices = {
		{ id = 1, value = "Rank Soco" },
		{ id = 2, value = "Rank Clava" },
		{ id = 3, value = "Rank Espada" },
		{ id = 4, value = "Rank Machado" },
		{ id = 5, value = "Rank Distancia" },
		{ id = 6, value = "Rank Escudo" },
		{ id = 7, value = "Rank Pesca" },
		{ id = 8, value = "Rank Magia" },
		{ id = 9, value = "Rank Level" }
	},
	popup = false
}
function getGroupDb(player_id)
	local query = db.getResult("SELECT `group_id` FROM `players` WHERE `id`= "..player_id)
	return query:getDataInt("group_id")
end
function callback2(cid, button, choice)
	if (button == 1) then
		local str = ""
		if (choice == 1) then
			str = "--[ Rank Soco ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 0 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 2) then
			str = "--[ Rank Clava ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 1 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 3) then
			str = "--[ Rank Espada ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 2 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 4) then
			str = "--[ Rank Machado ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 3 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 5) then
			str = "--[ Rank Distancia ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 4 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 6) then
			str = "--[ Rank Escudo ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 5 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 7) then
			str = "--[ Rank Pesca ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 6 ORDER BY `value` DESC LIMIT 20;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 8) then
			str = "--[ Rank Magia ]--\n"
			query = db.getResult("SELECT `maglevel`, `name` FROM `players` WHERE `group_id` < 3 ORDER BY `maglevel` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("maglevel") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 9) then
			str = "--[ Rank Level ]--\n"
			query = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` < 3 ORDER BY `experience` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("level") .. "]"
				k = k + 1 until not query:next()
			end
		end
		doShowTextDialog(cid, 5785, str)
	end
end
	
function onSay(cid, words, param)
	addDialog(modaldialog2, 1002, cid, callback2);
	return true
end

 

no distancia o adm aparece é no rank magia é rank level aparece o account mananger o resto deu certo tem como arruma por favor?

Link para o post
Compartilhar em outros sites
modaldialog2 = {
	title = "Rank System",
	message = "Selecione a classificação que você quer ver:",
	buttons = {
		{ id = 1, value = "Ver" },
		{ id = 2, value = "Sair" },
	},
	buttonEnter = 1,
	buttonEscape = 2,
	choices = {
		{ id = 1, value = "Rank Soco" },
		{ id = 2, value = "Rank Clava" },
		{ id = 3, value = "Rank Espada" },
		{ id = 4, value = "Rank Machado" },
		{ id = 5, value = "Rank Distancia" },
		{ id = 6, value = "Rank Escudo" },
		{ id = 7, value = "Rank Pesca" },
		{ id = 8, value = "Rank Magia" },
		{ id = 9, value = "Rank Level" }
	},
	popup = false
}
function getGroupDb(player_id)
	local query = db.getResult("SELECT `group_id` FROM `players` WHERE `id`= "..player_id)
	return query:getDataInt("group_id")
end
function callback2(cid, button, choice)
	if (button == 1) then
		local str = ""
		if (choice == 1) then
			str = "--[ Rank Soco ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 0 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 2) then
			str = "--[ Rank Clava ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 1 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 3) then
			str = "--[ Rank Espada ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 2 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 4) then
			str = "--[ Rank Machado ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 3 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 5) then
			str = "--[ Rank Distancia ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 4 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 6) then
			str = "--[ Rank Escudo ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 5 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 7) then
			str = "--[ Rank Pesca ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 6 ORDER BY `value` DESC LIMIT 20;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 8) then
			str = "--[ Rank Magia ]--\n"
			query = db.getResult("SELECT `maglevel`, `name` FROM `players` WHERE `id` > 6 AND `group_id` < 3 ORDER BY `maglevel` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("maglevel") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 9) then
			str = "--[ Rank Level ]--\n"
			query = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `id` > 6 AND `group_id` < 3 ORDER BY `experience` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("level") .. "]"
				k = k + 1 until not query:next()
			end
		end
		doShowTextDialog(cid, 5785, str)
	end
end
	
function onSay(cid, words, param)
	addDialog(modaldialog2, 1002, cid, callback2);
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
Em 01/06/2018 em 17:57, Vodkart disse:

modaldialog2 = {
	title = "Rank System",
	message = "Selecione a classificação que você quer ver:",
	buttons = {
		{ id = 1, value = "Ver" },
		{ id = 2, value = "Sair" },
	},
	buttonEnter = 1,
	buttonEscape = 2,
	choices = {
		{ id = 1, value = "Rank Soco" },
		{ id = 2, value = "Rank Clava" },
		{ id = 3, value = "Rank Espada" },
		{ id = 4, value = "Rank Machado" },
		{ id = 5, value = "Rank Distancia" },
		{ id = 6, value = "Rank Escudo" },
		{ id = 7, value = "Rank Pesca" },
		{ id = 8, value = "Rank Magia" },
		{ id = 9, value = "Rank Level" }
	},
	popup = false
}
function getGroupDb(player_id)
	local query = db.getResult("SELECT `group_id` FROM `players` WHERE `id`= "..player_id)
	return query:getDataInt("group_id")
end
function callback2(cid, button, choice)
	if (button == 1) then
		local str = ""
		if (choice == 1) then
			str = "--[ Rank Soco ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 0 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 2) then
			str = "--[ Rank Clava ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 1 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 3) then
			str = "--[ Rank Espada ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 2 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 4) then
			str = "--[ Rank Machado ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 3 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 5) then
			str = "--[ Rank Distancia ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 4 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 6) then
			str = "--[ Rank Escudo ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 5 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 7) then
			str = "--[ Rank Pesca ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 6 ORDER BY `value` DESC LIMIT 20;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 8) then
			str = "--[ Rank Magia ]--\n"
			query = db.getResult("SELECT `maglevel`, `name` FROM `players` WHERE `id` > 6 AND `group_id` < 3 ORDER BY `maglevel` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("maglevel") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 9) then
			str = "--[ Rank Level ]--\n"
			query = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `id` > 6 AND `group_id` < 3 ORDER BY `experience` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("level") .. "]"
				k = k + 1 until not query:next()
			end
		end
		doShowTextDialog(cid, 5785, str)
	end
end
	
function onSay(cid, words, param)
	addDialog(modaldialog2, 1002, cid, callback2);
	return true
end

 

image.png.069308c5a5213b4f2ffcab22ac4064a8.pngos demais estão correto porem o rank de level não aparece os player...

Link para o post
Compartilhar em outros sites

qual id do seu char? e group dele? ID que eu digo é na database, ID da conta/player

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
17 minutos atrás, Vodkart disse:

qual id do seu char? e group dele? ID que eu digo é na database, ID da conta/player

image.png.5c1748e10f20065f58af84186f860bcb.png

Link para o post
Compartilhar em outros sites
  • Solução

ta configurado para aparecer só id maior que 6 kk

 

nessa parte do código 

 

WHERE `id` > 6 AND

 

coloca maior que 2

 

WHERE `id` > 2 AND

 

 

da CTRL + F e troque o 6 por 2!!

 

abraços

 

------------------------------

 

 

modaldialog2 = {
	title = "Rank System",
	message = "Selecione a classificação que você quer ver:",
	buttons = {
		{ id = 1, value = "Ver" },
		{ id = 2, value = "Sair" },
	},
	buttonEnter = 1,
	buttonEscape = 2,
	choices = {
		{ id = 1, value = "Rank Soco" },
		{ id = 2, value = "Rank Clava" },
		{ id = 3, value = "Rank Espada" },
		{ id = 4, value = "Rank Machado" },
		{ id = 5, value = "Rank Distancia" },
		{ id = 6, value = "Rank Escudo" },
		{ id = 7, value = "Rank Pesca" },
		{ id = 8, value = "Rank Magia" },
		{ id = 9, value = "Rank Level" }
	},
	popup = false
}
function getGroupDb(player_id)
	local query = db.getResult("SELECT `group_id` FROM `players` WHERE `id`= "..player_id)
	return query:getDataInt("group_id")
end
function callback2(cid, button, choice)
	if (button == 1) then
		local str = ""
		if (choice == 1) then
			str = "--[ Rank Soco ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 0 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 2) then
			str = "--[ Rank Clava ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 1 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 3) then
			str = "--[ Rank Espada ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 2 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 4) then
			str = "--[ Rank Machado ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 3 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 5) then
			str = "--[ Rank Distancia ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 4 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 6) then
			str = "--[ Rank Escudo ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 5 ORDER BY `value` DESC;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 7) then
			str = "--[ Rank Pesca ]--\n"
			query = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = 6 ORDER BY `value` DESC LIMIT 20;")
			if (query:getID() ~= -1) then 
			k = 1 
			repeat 
			if k > 20 then break end
			if getGroupDb(query:getDataString("player_id")) < 3 then	
				str = str .. "\n " .. k .. ". "..(getPlayerNameByGUID(query:getDataString("player_id"))).." - [" .. query:getDataInt("value") .. "]"
				k = k + 1 
			end
				until not query:next()
			end
		elseif (choice == 8) then
			str = "--[ Rank Magia ]--\n"
			query = db.getResult("SELECT `maglevel`, `name` FROM `players` WHERE `id` > 2 AND `group_id` < 3 ORDER BY `maglevel` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("maglevel") .. "]"
				k = k + 1 until not query:next()
			end
		elseif (choice == 9) then
			str = "--[ Rank Level ]--\n"
			query = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `id` > 2 AND `group_id` < 3 ORDER BY `experience` DESC LIMIT 20;")
			if (query:getID() ~= -1) then k = 1 repeat if k > 20 then break end
				str = str .. "\n " .. k .. ". "..(query:getDataString("name")).." - [" .. query:getDataInt("level") .. "]"
				k = k + 1 until not query:next()
			end
		end
		doShowTextDialog(cid, 5785, str)
	end
end
	
function onSay(cid, words, param)
	addDialog(modaldialog2, 1002, cid, callback2);
	return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo