Witajcie, ot?? mam problem zwi?zany z tymi znajd?kami, a mianowicie. Wszystkie mam odpowiednio ustawione i gdy zbior? jedn? to wyskakuje mi ?e znalaz?em 2 na np. 50. M?g?by kto? pom?c?
Tutaj kod znajdziek:
[lua]local znajdzki={}
local sql = nil
addEventHandler("onResourceStart",resourceRoot,function()
sql = dbConnect( "mysql", "dbname=db_24561;host=137.74.0.12;charset=utf8", "db_24561", "498v69bp", "share=1" )
if sql then outputDebugString('[znajdzki-sql] ok') end
end)
function query(...)
if not sql then return end
local q = dbQuery(sql,...)
local r,n,i = dbPoll(q,-1)
return r,n,i
end
function czyZnalazlZnajdzke(plr,id)
if not plr or not id then return end
local q = query('select * from znajdzki_posiadacze where uid=?',getElementData(plr,"player:uid"))
if q and #q then
local split = split(q[1]['znajdzki'],",")
if split[id] == "1" then
return true
else
return false
end
else
return false
end
end
function znalezione(plr)
local q = query("select * from znajdzki_posiadacze where uid=?",getElementData(plr,"player:uid"))
if q and #q then
ile = 1
local split = split(q[1]['znajdzki'],",")
for i=1,#split do
if split[i] == "1" then
ile = ile... |