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