Ir para conteúdo

Featured Replies

Postado
  • Autor
2 minutos atrás, luanluciano93 disse:

-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr")
			local test2 = result.getString(resultId, "attr")
			local test3 = tonumber(test1)
			local test4 = tonumber(test2)
			
			if test1 then print(test1) end
			if test2 then print(test2) end
			if test3 then print(test3) end
			if test4 then print(test4) end

		until not result.next(resultId)
	end
	return false
end

 

image.png

  • Respostas 23
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `at

  • luanluciano93
    luanluciano93

    -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `at

  • luanluciano93
    luanluciano93

    -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`sid`, CONVERT(`attributes` USING latin1) AS `attr` F

Postado
-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr")
			local test2 = result.getString(resultId, "attr")
			local test3 = tonumber(test1)
			local test4 = tonumber(test2)
			
			if test1 then print("stream: " .. test1 .." / ".. type(test1)) end
			if test2 then print("string: " .. test2 .." / ".. type(test2)) end
			if test3 then print("number1: " .. test3 .." / ".. type(test3)) end
			if test4 then print("number2: " .. test4 .." / ".. type(test4)) end

		until not result.next(resultId)
	end
	return false
end

 

Postado
  • Autor
3 minutos atrás, luanluciano93 disse:

-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr")
			local test2 = result.getString(resultId, "attr")
			local test3 = tonumber(test1)
			local test4 = tonumber(test2)
			
			if test1 then print("stream: " .. test1 .." / ".. type(test1)) end
			if test2 then print("string: " .. test2 .." / ".. type(test2)) end
			if test3 then print("number1: " .. test3 .." / ".. type(test3)) end
			if test4 then print("number2: " .. test4 .." / ".. type(test4)) end

		until not result.next(resultId)
	end
	return false
end

 

image.png

Postado
-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr") -- retorn string
			if test1 then
				local test = string.sub(test1, 25, 34)
				print(test)
				if tonumber(test) then
					print("number: ".. test)
				end
			end
		until not result.next(resultId)
	end
	return false
end

 

Postado
  • Autor
4 minutos atrás, luanluciano93 disse:

-- <talkaction words="!test" script="teste.lua" />

function onSay(player, words, param)
	local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'")	
	if resultId then
		repeat
			local test1 = result.getStream(resultId, "attr") -- retorn string
			if test1 then
				local test = string.sub(test1, 25, 34)
				print(test)
				if tonumber(test) then
					print("number: ".. test)
				end
			end
		until not result.next(resultId)
	end
	return false
end

 

 

image.png

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo