JoanarawrPT 11 Posted June 17, 2014 Olá CG, Vim publicar uma quest de sistema de avisos.. -------------------------------------WeXo-------------------------------------quest warn begin state start begin when 9005.chat."Add warn " with pc.is_gm() begin say_title("Add warn: ") say("Digite o nome completo do jogador: ") local meno = input() say_title("Adicione Aviso: ") say("Coloque a razao:") say("") local dvovod = input() say("To grant a warning: ") say_reward(meno) say("because: ") say_reward(dvovod) local acc_id = mysql_query("SELECT account_id FROM player.player WHERE name='"..meno.."' LIMIT 1 ;") say("Your account id: "..acc_id.account_id[1].." .") say("") local uloha = select("Sim", "Nao") if uloha == 1 then say_title("Adicionar aviso: ") mysql_query("INSERT INTO account.varovania (ucet_id,od,dvovod,cas) VALUES ('"..acc_id.account_id[1].."','"..pc.get_name().."','"..dvovod.."','"..os.date().."')") say("Finalizando "..meno.." ("..acc_id.account_id[1]..") foi bem sucedido. ") say("Porque "..dvovod..". ") say("") else say_title("Adicionar aviso: ") say_reward("Finalizando "..meno.." Nao foi bem sucedido. ") say("") end end endend SQL : Code : CREATE TABLE `varovania` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ucet_id` int(30) NOT NULL DEFAULT '', `od` varchar(45) NOT NULL DEFAULT '', `dvovod` varchar(255) DEFAULT NULL, `cas` varchar(255) DEFAULT '', PRIMARY KEY (`id`),) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 Créditos :Criada por WexoTraduzida for me :3 Share this post Link to post Share on other sites
OceanusMT2 110 Posted June 17, 2014 a querry esta bem feita? Esta a dar erro quando a tento adicionar (r34083) edit: testas-te ao menos isso? -.- http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/3303822-quest-warning-system.html Share this post Link to post Share on other sites