• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Problem z pobraniem wyników do tabeli.

GarQet

Own3d!
Joined
Feb 10, 2009
Messages
1,381
Solutions
14
Reaction score
81
Do zamknięcia, podołałem.
 
Last edited:
LUA:
function onSay(cid, words, param, channel)

	local Info = db.getResult("SELECT `code` FROM `codes` WHERE `to_name` = '".. getCreatureName(cid) .."'")
	local kody = {}
	repeat
	table.insert(kody, Info:getDataString("code"))
	until (not(Info:next()))
	Info:free()

if(isInArray(param, kody)) then
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
elseif(param ~= kody) then
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Nie trybi...(?)")
	return true
	end
end
Dwa razy wywolujesz
Info:next()
 
LUA:
function onSay(cid, words, param, channel)

	local Info = db.getResult("SELECT `code` FROM `codes` WHERE `to_name` = '".. getCreatureName(cid) .."'")
	local kody = {}
	repeat
	table.insert(kody, Info:getDataString("code"))
	until (not(Info:next()))
	Info:free()

if(isInArray(param, kody)) then
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
elseif(param ~= kody) then
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Nie trybi...(?)")
	return true
	end
end
Dwa razy wywolujesz

Jbc. nie działa to co dałeś. Inaczej zrobiłem, ale dzięki za chęci.
 
Back
Top