Mam ma?y problem bo jak mam t? linijke to nie zapisuje nic w databasie
kod:
function zbieracz(el, md)
if el ~= localPlayer or not md then return end
if getPedOccupiedVehicle(localPlayer) then
triggerEvent('onClientAddNotification', localPlayer, 'Nie mozesz zbierac w pojezdzie!', 'error')
return end
triggerEvent('onClientAddNotification', localPlayer, 'Zbierasz topy....', 'info')
setElementFrozen(el, true)
setPedAnimation(localPlayer, "COP_AMBIENT", "Copbrowse_nod", -1, true, false )
setTimer(function()
local topy = math.random(1,3)
setElementFrozen(el, false)
setPedAnimation(localPlayer, false)
t? tutaj--> exports["pystories-db"]:dbSet("UPDATE pystories_users SET jablka=jablka+"..topy.." WHERE id=?", getElementData(el, "player:sid"))
triggerEvent('onClientAddNotification', localPlayer, 'Zebrales '..topy..' topa(y)', 'success')
end, 4000, 1)
showMarker()
playSoundFrontEnd(12)
end
|